×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Charles St-Laurent wrote:
I try to convert a RPG/36 to ILE. This program uses a SPECIAL file with
SUBR01 as the subroutine name to get the data from an OCL. The SPECIAL file
is declarer as an primary input file. So I read in the IBM books that I must
pass 5 parameters to SUBR01 (in QSSP library) to obtain the same result with
my converted ILE program. Can someone give me an example of a program that
passes these parameters to SUBR01? I didn't find any example...
Simon is right on all counts. I'm just posting to clear up the question
about the number of parameters needed by SUBR01, and to give an example
of how to code it in ILE RPG (or RPG/400).
Since you still want to get data from an OCL, I assume you're going to
stay in the S36 environment, and for some reason you need this
particular program to be ILE RPG. It might be easier to split the
program up and keep the special-file part in RPG36.
SUBR01 expects 5 parameters; the fifth parameter describes the previous
4 parameters. Below is an ILE RPG program that uses SUBR01 as a special
file, using a special-file PLIST to handle the fifth parameter.
I hardly know any OCL36, so I have no idea how to get data into an OCL36
file, but SUBR01 seems to be able to get data from the command line.
To test the program below, assuming it's called TESTPGM:
===> STRS36
===> // LOAD TESTPGM
===> // RUN
Enter data on the command line.
Use F12 to signal end of file.
FSPEC IP F 50 SPECIAL PGMNAME('SUBR01')
F PLIST(DESC)
D parmInfo DS qualified
* Parm 1
D type1 1A inz('C')
D len1 4S 0 inz(1)
D decpos1 2S 0 inz(0)
D elems1 4S 0 inz(1)
* Parm 2
D type2 1A inz('C')
D len2 4S 0 inz(1)
D decpos2 2S 0 inz(0)
D elems2 4S 0 inz(1)
* Parm 3
D type3 1A inz('Z')
D len3 4S 0 inz(5)
D decpos3 2S 0 inz(0)
D elems3 4S 0 inz(1)
* Parm 4 (the record of the special file)
D type4 1A inz('C')
D len4 4S 0 inz(50)
D decpos4 2S 0 inz(0)
D elems4 4S 0 inz(1)
* Parm 5
D type4 1A inz('C')
D len4 4S 0 inz(11)
D decpos4 2S 0 inz(0)
D elems4 4S 0 inz(5)
ISPEC NS 01
I 1 50 MSG
C DESC PLIST
C PARM parmInfo
C MSG DSPLY
As an Amazon Associate we earn from qualifying purchases.