Page 1 of 1

Linkage section is not declared

PostPosted: Thu Feb 21, 2019 11:03 pm
by ravi11081992
Hi Folks,

Trying to pass the data from JCL to COBOL using parm parameter. I haven't declared linkage section in the COBOL program

Does it throw compilation error or run time error or runs successfully?

Please clarify

Thanks

Re: Linkage section is not declared

PostPosted: Thu Feb 21, 2019 11:04 pm
by Robert Sample
Your question falls into the category "easily answered by running a simple test". If you haven't done so, why not?

Re: Linkage section is not declared

PostPosted: Thu Feb 21, 2019 11:12 pm
by ravi11081992
Sorry, currently I don't have access to mainframe server

Re: Linkage section is not declared

PostPosted: Fri Feb 22, 2019 12:41 am
by Robert Sample
The compile fails with an IGYPA3067-S
Operand <variable name> was not defined in the "LINKAGE SECTION". The statement was discarded.
A severe error such as this (that's what the -S means after the message ID) sets the return code to 12 so the linkage edit will not execute and the program will not execute.

Re: Linkage section is not declared

PostPosted: Sun Feb 24, 2019 8:08 pm
by ravi11081992
Thanks Robert