× 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.



Hi!

Just a problem about this part of your code for the fifth parameter

D type4 1A inz('C')
D len4 4S 0 inz(11)
D decpos4 2S 0 inz(0)
D elems4 4S 0 inz(5)

Is it supposed to be type5, len5, decpos5 ans elems5? ;-)

I will try your code this afernoon to read the data contained after the RUN
statement of my OCL36. But I wonder if it won't be easier to leave this
program in its actual state and then rewrite it from scratch with RPG/ILE
without its SPECIAL file... If we want to really convert it to pure RPG/ILE
environment, the use of SUBR01 is incorrect, since it is part of the S/36
environment... The only workaround is to develop my own program to be used
with my special file...

I will discuss about this point with my project manager...

Charles

"Barbara Morris" <bmorris@xxxxxxxxxx> a écrit
dans le message de news: fstgkm$tke$1@xxxxxxxxxxxxxxxx
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

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.