How to supply parameter



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

Re: How to supply parameter

Postby BillyBoyo » Sat Dec 24, 2011 6:24 am

I guess this is a training exercise?

Robert is pointing out that there is a Cobol program expecting a file called PARMS. You therefore would need a DD statement for PARMS. If it has to be for instream data, it would go like this:

//PARMS DD *
followed immediately by your data
/*


The DD statement followed by the data can go anywhere inside your step (not "inside" another JCL statement). Try putting it immediately after you SYSTSIN DD * and the data associated with that.

I do believe if you google you'll find that someone has had the identical problem in the past.

EDIT: The PARM you have already is going elsewhere, to do with running DB2. Don't touch that. The exercise has an element of confusion by having a DD called PARMS as well as the PARM on the EXEC. Forget the PARM on the EXEC. Did you write the Cobol program, or you just have to get the JCL working?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Re: How to supply parameter

 

Re: How to supply parameter

Postby clapclash » Sat Dec 24, 2011 6:38 am

BillyBoyo wrote:I guess this is a training exercise?

Robert is pointing out that there is a Cobol program expecting a file called PARMS. You therefore would need a DD statement for PARMS. If it has to be for instream data, it would go like this:

//PARMS DD *
followed immediately by your data
/*


The DD statement followed by the data can go anywhere inside your step (not "inside" another JCL statement). Try putting it immediately after you SYSTSIN DD * and the data associated with that.

I do believe if you google you'll find that someone has had the identical problem in the past.

EDIT: The PARM you have already is going elsewhere, to do with running DB2. Don't touch that. The exercise has an element of confusion by having a DD called PARMS as well as the PARM on the EXEC. Forget the PARM on the EXEC. Did you write the Cobol program, or you just have to get the JCL working?



Thanks for your answer. I've been googlin for hours and I couldn't find any solution. I've start few JCL online tutorials but they are pretty poor in contents. I'm gonna try your solution tomorrow morning. One more question, when I supply the parameter values how do I list them? I mean do I need commas to separate the different values or newlines? I know that these kind of question are pretty basic and I want to apologise for the time you guys invested answering my initial question, but I really want to resolve this problem. Any suggestions about what book or course I should start with????
Thanks
clapclash
 
Posts: 26
Joined: Fri Dec 23, 2011 9:10 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to supply parameter

Postby Robert Sample » Sat Dec 24, 2011 6:43 am

Terminology is critical in IT, where similar terms may mean very different things. You need to spend some time learning the basics -- such as what a DD statement is, what a JCL parameter is, what a program parameter is, what a parameter file is, why all three (parameter types) can be used in a single execution.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: How to supply parameter

Postby clapclash » Sat Dec 24, 2011 6:56 am

Robert Sample wrote:Terminology is critical in IT, where similar terms may mean very different things. You need to spend some time learning the basics -- such as what a DD statement is, what a JCL parameter is, what a program parameter is, what a parameter file is, why all three (parameter types) can be used in a single execution.


Thanks Robert, but I just said that I'm a newbie and I'm learning, so instead of just tell me what I should deeply understand, why u don't tell me a reliable source for a tutorial or a book that can satisfy my needs?
I'm not looking for a "fish", I want to know "how to fish" : )
clapclash
 
Posts: 26
Joined: Fri Dec 23, 2011 9:10 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to supply parameter

Postby Robert Sample » Sat Dec 24, 2011 7:05 am

Why not start with the z/OS Internet Library at http://www-03.ibm.com/systems/z/os/zos/bkserv/ and also the z/OS Basic Skills Information Center at http://publib.boulder.ibm.com/infocenter/zos/basics/index.jsp? You would be wise to bookmark the z/OS Internet Library site as you will be using it many, many, many times in the future.

However, you need to understand that YOU need to at least pay attention and show some initiative -- if you don't understand EVERY line of your job output, you need to investigate until you do understand. If you had done this to start with, you could have found -- on your own -- that a file status 35 in COBOL means that a non-optional DD statement was not present; following up to find out what a DD statement was probably would have allowed you to answer this question without even doing a post here. IT is not a good place to expect to be spoon-fed knowledge; most of us with 30 or more years in the field had to do a LOT of self-motivated learning on our own to find out the things we pass on in this forum.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: How to supply parameter

Postby halfteck » Sat Dec 24, 2011 9:48 am

note to me, read page 2 before providing solution, text removed by me as its already been covered
halfteck
 
Posts: 42
Joined: Tue Nov 08, 2011 8:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to supply parameter

Postby NicC » Sat Dec 24, 2011 12:07 pm

Note also: what you pasted as your 'entire program' is not a program at all but a 'job'. The JCL tells the OS which programs you want to run and what resources they need.
Also, persevere with those JCL tutorials - your level of knowledge is such that you cannot tell if they are good or not.
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 to supply parameter

Postby BillyBoyo » Sat Dec 24, 2011 3:21 pm

If you are going to google, you have to know a bit about what might be likely. I used "MAXCC=99 CN(INTERNAL)", thinking at the time that 99 might be something db2-ish. It wasn't, but got your exact program.


Don't bother about the "expert" answer to the question. There is enough from what you can see for you not to have to pay (or do the free trial). Seems you might get better answers/no worse here anyway, for free.

So, the other guy is not a Cobol programmer, I'm guessing you are not.

Don't put quotes around your "parm" data. You'll get the S0C7 the other guy did.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: How to supply parameter

Postby BillyBoyo » Sat Dec 24, 2011 3:29 pm

:oops: Sorry about posting the actual link. Unfortunately it took me longer than ten minutes to get upstairs, so I couldn't "edit" the post.

//ADDMATR JOB MSGCLASS=H,NOTIFY=&SYSUID
//ADDMATR EXEC PGM=IKJEFT01, PARM='DSN SYSTEM(DB1S)'
//STEPLIB DD DISP=SHR,DSN=DB2.V9R1.SDSNLOAD
DD DISP=SHR,DSN=ZOS.PART2.LOAD
//SYSTSIN DD *
RUN PLAN(ADDMATR) PROGRAM(ADDMATR)
//SYSTSPRT DD SYSOUT=*
//PARMS DD *
255912011-07-012011-09-30
//ADDMATR DD SYSOUT=*
//SYSOUT DD SYSOUT=*
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: How to supply parameter

Postby clapclash » Sat Dec 24, 2011 7:34 pm

Thank you very much guys! I have to admit that I'm still not pretty confident with the JCL terminology and for this reason I'm gonna put all my efforts to increase my JCL knowledge! Thanks to everyone!
clapclash
 
Posts: 26
Joined: Fri Dec 23, 2011 9:10 pm
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post