how does JCL's PARM use ?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

how does JCL's PARM use ?

Postby gycwolf » Fri Aug 09, 2013 6:12 pm

//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 ?
gycwolf
 
Posts: 11
Joined: Fri Aug 09, 2013 5:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: how does JCL's PARM use ?

 

Re: how does JCL's PARM use ?

Postby NicC » Fri Aug 09, 2013 6:17 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: how does JCL's PARM use ?

Postby steve-myers » Fri Aug 09, 2013 6:35 pm

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.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: how does JCL's PARM use ?

Postby gycwolf » Mon Aug 12, 2013 2:11 pm

I find storage's explain in the Language Environment for OS/390.
thank you very much. (^-^)
gycwolf
 
Posts: 11
Joined: Fri Aug 09, 2013 5:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: how does JCL's PARM use ?

Postby npathrikar » Thu Feb 09, 2017 1:04 pm

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
You do not have the required permissions to view the files attached to this post.
npathrikar
 
Posts: 1
Joined: Thu Feb 09, 2017 12:35 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how does JCL's PARM use ?

Postby Aki88 » Thu Feb 09, 2017 2:49 pm

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.
Aki88
 
Posts: 371
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 35 times

Re: how does JCL's PARM use ?

Postby NicC » Thu Feb 09, 2017 2:59 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: how does JCL's PARM use ?

Postby prino » Sat Feb 11, 2017 10:33 pm

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!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 536
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 21 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post