Procedures

From MidrangeWiki
Revision as of 20:12, 11 August 2008 by Starbuck5250 (talk | contribs) (+ILE CALLPRC)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.