Page 1 of 1

how does JCL's PARM use ?

PostPosted: Fri Aug 09, 2013 6:12 pm
by gycwolf
//STEP1 EXEC PGM=XXXXX,PARM='STORAGE(00,NONE,00,0K)/'
I hope to know that how to use the PARM.
would you please help me ?

Re: how does JCL's PARM use ?

PostPosted: Fri Aug 09, 2013 6:17 pm
by NicC
Not without knowing what the program does with the parm. A prm to a program is data that that program requires in order to function in a certain way. Each parm is specific to each program.

Re: how does JCL's PARM use ?

PostPosted: Fri Aug 09, 2013 6:35 pm
by steve-myers
The STORAGE(00,NONE,00,0K)/ is just a text string sent to the program in a defined way. The text string has meaning only to the program. The program, and only the program, translates the contents of the text string and converts it to values that are important to the program.

Most Cobol, PL/I and C programs are linked with a run time subroutine package called Language Environment, often abbreviated as LE. LE gets a look at the parameter text before the actual program sees it. The / character separates the parameter text your program sees from the parameter text LE uses. What I think we have here is LE looks at STORAGE(00,NONE,00,0K), and passes a null string to your program. A manual titled Language Environment Customization for your z/OS release should tell you how LE interprets STORAGE(00,NONE,00,0K). Good luck.

Re: how does JCL's PARM use ?

PostPosted: Mon Aug 12, 2013 2:11 pm
by gycwolf
I find storage's explain in the Language Environment for OS/390.
thank you very much. (^-^)

Re: how does JCL's PARM use ?

PostPosted: Thu Feb 09, 2017 1:04 pm
by npathrikar
the parm parameter is used to pass value to cobol.This technique uses a PARM=parameter keyword on the EXEC statement in JCL.
Untitled1.png
The COBOL program requires a LINKAGE SECTION.
Untitled.png
output is
Untitled3.png

Re: how does JCL's PARM use ?

PostPosted: Thu Feb 09, 2017 2:49 pm
by Aki88
Hello,

npathrikar wrote:the parm parameter is used to pass value to cobol....


From the fine JCL Reference (please also refer NicC's post on this topic, then refer Mr. Myers post, it gives important insights into a few other things):

PARM parameter
Parameter type
Keyword, optional
Purpose
Use the PARM parameter to pass variable information to the processing program executed by this job step. To use the information, the processing program must contain instructions to retrieve the information.


Which means, PARM can pass values to any program written in- COBOL/other-programming-languages (governed by the respective language's syntactical rules) - that follows an 'EXEC PGM=' statement in a JCL; note that there are other ways as well to pass values to programs.

Aside, I am sure gycwolf found the solution a fair while back.

Re: how does JCL's PARM use ?

PostPosted: Thu Feb 09, 2017 2:59 pm
by NicC
Nikhil,
This statement is wrong:
the parm parameter is used to pass value to cobol

The parm is passed to the program which could be written in assembler, PL/1, COBOL, C etc and only if the parm is not for LE, as was explained above.

Also, please do not use attachments - use cut and paste with the code tags (search in the forum about those). For starters it saves storage - your second item is 48 bytes in length but took almost 1700 bytes in forum storage. Secondly, it would have been much quicker for you to create your post by just doing a cut'n'paste. Thirdly, do not resurrect old topics.

Re: how does JCL's PARM use ?

PostPosted: Sat Feb 11, 2017 10:33 pm
by prino
NicC wrote:Thirdly, do not resurrect old topics.

Fourthly, moderators should lock any topic that is hasn't had a reply for more than a month, or that is at least two months old!