Tried that, same results, BUT . . .
I found the problem and it is COBOL-related, no JCL or PARM weirdness applies.
The PROCEDURE DICISION statement did not specify the PARM-FIELDS variable in
the LINKAGE SECTION as a parameter.
The program just has:
PROCEDURE DIVISION.
Instead of the required:
PROCEDURE DIVISION USING PARM-FIELDS.
Sorry for the waste of bandwidth.
Peter
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Gord Tomlin
Sent: Tuesday, December 17, 2019 6:20 PM
To: [email protected]
Subject: Re: Adding a PARM to a PROCSTEP where no PARM is coded
On 2019-12-17 17:42, Farley, Peter x23353 wrote:
> I thought I know this stuff, but my employer's z/OS V2.2 system is saying I
> don't.
>
> I have a simple one-step PROC which executes a COBOL program but has no
> keyword parameters on the EXEC statement, like this:
>
> //MYPROC PROC OUT=*
> //MYPGM EXEC PGM=MYPGM
> //SYSOUT DD SYSOUT=&OUT
> // PEND
>
> MYPGM is compiled with COBOL V5.2 and has a LINKAGE SECTION like this:
>
> LINKAGE SECTION.
> 01 PARM-FIELDS.
> 05 PARM-LENGTH PIC S9(04) COMP.
> 05 PARM-AREA PIC X(25).
>
> When I code the following execution of MYPROC, there is apparently NO PARM
> passed to MYPGM:
>
> //STEP01 EXEC MYPROC,PARM.MYPGM='PARM,DATA,'
>
> When displayed by the program, PARM-LENGTH has a value of (decimal) +10 but
> when PARM-AREA is displayed it shows unprintable hex characters.
>
> .......÷.........Ùf&....".0
> 0000003E000000000F8500007FF
> 0A000101000000000D600000FF0
>
> Am I crazy? Shouldn't PARM-AREA in this case print as "PARM,DATA,"? The hex
> data that prints instead looks to me suspiciously like the contents of
> address 0 in the LPAR, but I could be wrong about that.
>
> Pete
What happens if you use:
//STEP01 EXEC MYPROC,PARM.MYPGM='/PARM,DATA,'
--
This message and any attachments are intended only for the use of the addressee
and may contain information that is privileged and confidential. If the reader
of the message is not the intended recipient or an authorized representative of
the intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication
in error, please notify us immediately by e-mail and delete the message and any
attachments from your system.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN