|
If you want it as seperate fields, you can get rid of the 01 level, make
the 05 levels all 01 level fields, have each field on the using - ie:
01 P1300-COMPANY-IN PIC X(4).
01 P1300-CLIENT-CODE-IN PIC X(5).
01 P1300-JOBNUM-IN PIC X(11).
01 P1300-MODE PIC X(1).
01 P1300-TE-FLAG PIC X(1).
01 P1300-RTN-CODE PIC X(2).
01 P1300-ERR-MSG PIC X(80).
---
CALL 'PD1300RG' USING P1300-COMPANY-IN, P1300-CLIENT-CODE-IN,
P1300-JOBNUM-IN,
P1300-MODE, P1300-TE-FLAG,P1300-RTN-CODE, P1300-ERR-MSG.
Dale Nieswiadomy
Livingston County Information & Technology Services
(585) 243-7191
dnieswiadomy@co.livingston.ny.us
Dan
<dbcerpg@yahoo.co
m> To
Sent by: cobol400-l@midrange.com
cobol400-l-admin@ cc
midrange.com
Subject
passing parms between Cobol/400 &
12/10/2002 11:29 ILE-RPG
AM
Please respond to
cobol400-l@midran
ge.com
This is primarily an RPG shop that has a lot of legacy Cobol from a
non-IBM system that the AS/400 replaced years ago. I am a relative
Cobol newbie (haven't done any meaningful Cobol coding since college).
Got a Cobol program (non-ILE) passing parameters to an ILE-RPG program.
I am told by other RPG programmers here that also do a little Cobol
that to pass parameters between Cobol and RPG, you have to define the
*Entry parameter in RPG as one long string and define subfields in a
data structure. If you try to define multiple PARMs for the parameter
list in the RPG program, the call will bomb with MCH3601.
The definition and the code in Cobol:
01 1300RG-PARMS.
05 P1300-COMPANY-IN PIC X(4).
05 P1300-CLIENT-CODE-IN PIC X(5).
05 P1300-JOBNUM-IN PIC X(11).
05 P1300-MODE PIC X(1).
05 P1300-TE-FLAG PIC X(1).
05 P1300-RTN-CODE PIC X(2).
05 P1300-ERR-MSG PIC X(80).
---
CALL 'PD1300RG' USING 1300RG-PARMS.
I assume that the USING phrase allows multiple fields. True or False?
I am going on the assumption that it does, but I don't know if there
are special rules in the case of a Cobol program calling an RPG
program. The Cobol manual I have makes the assumption when describing
the USING phrase that a Cobol program is calling another Cobol program,
so I don't know if this implies potential problems or other rules when
Cobol calls RPG.
Are there any references to Cobol calling RPG that would answer this
question for me?
TIA, Dan
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing
list
To post a message email: COBOL400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l
or email: COBOL400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.