Difference between revisions of "Procedures"

From MidrangeWiki
Jump to: navigation, search
m
(+ILE CALLPRC)
 
Line 1: Line 1:
[[Category:RPG]]
+
==System/36 procedures==
[[Category:CLP]]
 
 
 
 
Once upon a time on an [[OS]] called [[SSP]] programs written in the SSP programming language that was a forerunner to [[CLP]] called [[OCL]] were called "Procedures".
 
Once upon a time on an [[OS]] called [[SSP]] programs written in the SSP programming language that was a forerunner to [[CLP]] called [[OCL]] were called "Procedures".
  
 
Operation Control Language was not considered "real programming" like [[RPG]], so some other name was needed, in place of programs.
 
Operation Control Language was not considered "real programming" like [[RPG]], so some other name was needed, in place of programs.
 +
 +
==ILE procedures==
 +
With the advent of [[ILE]], the word ''procedure'' has a new meaning.  More properly called sub-procedures, a [[CL]] program can call an ILE sub-procedure via the [[CALLPRC]] command: {{code|CALLPRC PRC(rpglePrc) parm(&char10 &char20) rtnval(&char2)}}
 +
 +
There is a known issue having an ILE sub-procedure return a one character value back to a CL program.  It is documented in several [http://archive.midrange.com/midrange-l/200312/msg00783.html Midrange-L] threads.  There are two recognised solutions:
 +
* Change the sub-procedure to use {{code|EXTPROC(*CL: 'MYPROCNAME')}} (V5R1 and later)
 +
* Declare the return value as {{code|*CHAR 2}} in the CL and substring out the left-most character.
 +
 +
 +
==Categories==
 
{{stub}}
 
{{stub}}
 +
[[Category:RPG]]
 +
[[Category:CLP]]

Latest revision as of 20:12, 11 August 2008

System/36 procedures

Once upon a time on an OS called SSP programs written in the SSP programming language that was a forerunner to CLP called OCL were called "Procedures".

Operation Control Language was not considered "real programming" like RPG, so some other name was needed, in place of programs.

ILE procedures

With the advent of ILE, the word procedure has a new meaning. More properly called sub-procedures, a CL program can call an ILE sub-procedure via the CALLPRC command: CALLPRC PRC(rpglePrc) parm(&char10 &char20) rtnval(&char2)

There is a known issue having an ILE sub-procedure return a one character value back to a CL program. It is documented in several Midrange-L threads. There are two recognised solutions:

  • Change the sub-procedure to use EXTPROC(*CL: 'MYPROCNAME') (V5R1 and later)
  • Declare the return value as *CHAR 2 in the CL and substring out the left-most character.


Categories

This article is a stub. You can help by editing it.