Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing parm with '/' to COBOL pgm - error 1

Status
Not open for further replies.

tcurrier

Programmer
Mar 5, 2000
40
US
I'm not sure which forum this belongs in, but here goes anyway :

I am trying to pass a parm to a program via a Rexx exec using LINKPGM :

EPAPARM = "/ADFPTVWUMAH5"
ADDRESS LINKPGM 'EPA ' EPAPARM

I am getting a return code -2 on the ADDRESS LINKPGM command. So, I created another dummy program to see if the rc -2 was program specific. It's not. I get a rc -2 when passing the same parm to the dummy program. When I remove the '/' from the parm, it gets a rc 0.

I've searched all over and I can't find what the problem is. Can anyone help ? By the way, the parm with the '/' works fine when used in a batch MVS job.
 
I know nothing of REXX, but I looked around a little bit at some REXX programs. It might be that your PC REXX is treating the '/' as the beginning of a comment.

Just a quick guess.
 
IIRC, the slash is used to separate the LE runtime parameters from the program runtime parameters in the PARM= part of the EXEC JCL statement.

My guess is that REXX LINKPGM needs arguments (parameters) passed differently. Try:
Code:
ADDRESS LINKPGM "EPA EPAPARM"

Regards,

Glenn
 
Thanks... That worked for my dummy test COBOL program, but it's still not working for my call to the EPA program. I suspect now that the EPA program is Assembler. Would there be a different way to pass a PARM to an Assembler program ?
 
Normally you'd not include the slash for an assembler program. (Unless the program requires it for some odd reason or if, perhaps, assembler is using the LE runtime so it can call a routine in an LE-enabled language like COBOL.)

Glenn
 
Well, at least I got it to work by using:

ADDRESS LINKMVS "EPA EPAPARM"

I have to read up on this more, but it's working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top