How to supply parameter



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

How to supply parameter

Postby clapclash » Fri Dec 23, 2011 11:44 pm

Hi everyone, I am new to JCL and I have a question: how do you supply parameters to SYSTSIN DD statement?
The piece of code I am trying to fix is this:

//SYSTSIN DD *
RUN PLAN(ADDMATR) PROGRAM(ADDMATR)
//SYSTSPRT DD SYSOUT=*

The parameter I have to supply is in the format: xxxxxxxx-xx-xxxxxxxx-xx-xx

I hope you can help or maybe just suggest a good book for beginners,

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 BillyBoyo » Sat Dec 24, 2011 12:26 am

//anyname DD *


The * just tells the operating system that when a program opens, reads and closes the file, the data to be used is that which follows the DD statement, until "/*" (an indicator of no more cards, old-style) or another JCL statement is encountered (// in columns 1 and 2) or the end of the JCL is reached.

I don't know where you think parameters comes into it. You can supply as many "cards" as you like following the DD *, but I don't know if that is what you mean.

Any time you see DD *, you could also replace the * with the dataset-name of a fixed-length (RECFM F or FB) which could be an ordinary sequential file or a PDS member, and that dataset/member can contain the data achieving the same effect as the DD *.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to supply parameter

Postby steve-myers » Sat Dec 24, 2011 12:28 am

I think, properly speaking, that this is a DB2 question, not a JCL question, and that the parameter is to be supplied with the RUN PLAN command.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: How to supply parameter

Postby clapclash » Sat Dec 24, 2011 12:35 am

BillyBoyo wrote:
//anyname DD *


The * just tells the operating system that when a program opens, reads and closes the file, the data to be used is that which follows the DD statement, until "/*" (an indicator of no more cards, old-style) or another JCL statement is encountered (// in columns 1 and 2) or the end of the JCL is reached.

I don't know where you think parameters comes into it. You can supply as many "cards" as you like following the DD *, but I don't know if that is what you mean.

Any time you see DD *, you could also replace the * with the dataset-name of a fixed-length (RECFM F or FB) which could be an ordinary sequential file or a PDS member, and that dataset/member can contain the data achieving the same effect as the DD *.


Thank you for the quick answer. I basically need to supply this kind of variable/parameter xxxxxxxx-xx-xxxxxxxx-xx-xx (all x are digits) to the program and the program will calculate the result based on this parameter.
So far I have tried this:

//SYSTSIN DD *
RUN PLAN(ADDMATR) PROGRAM(ADDMATR)
xxxxxxxx-xx-xxxxxxxx-xx-xx
/*
//SYSTSPRT DD SYSOUT=*
//ADDMATR DD SYSOUT=*
//SYSOUT DD SYSOUT=*

but it gives me an error, so am I supposed to supply this parameter to the JCL using in-stream data???
Thanks for your help
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 BillyBoyo » Sat Dec 24, 2011 12:55 am

Do you have any colleagues around who have something similar working already?

From a quick google it might be

 
  RUN PLAN(ADDMATR) PROGRAM(ADDMATR) PARMS('xxxxxxxx-xx-xxxxxxxx-xx-xx')


As Steve suggested, a DB2 question.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to supply parameter

Postby clapclash » Sat Dec 24, 2011 1:09 am

BillyBoyo wrote:Do you have any colleagues around who have something similar working already?

From a quick google it might be

 
  RUN PLAN(ADDMATR) PROGRAM(ADDMATR) PARMS('xxxxxxxx-xx-xxxxxxxx-xx-xx')


As Steve suggested, a DB2 question.



I have tried it but with no results. I know that the problem is related to the parameter I have to supply, but I don't know how to work with it.
I paste the entire program so you guys might have a look at it again:

//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=*
//ADDMATR DD SYSOUT=*
//SYSOUT DD SYSOUT=*


And this is the output when I submit it:

13.34.52 JOB06386 $HASP165 ADDMATR ENDED AT ZOS19 MAXCC=99 CN(INTERNAL)

I hope someone of you can help me to understand it. 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 BillyBoyo » Sat Dec 24, 2011 5:35 am

You're going to need to show us some of the output from your job.

Are you using ISPF? Do you have access to SDSF or something else to look at "spool output files" with? Outlst, maybe?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to supply parameter

Postby clapclash » Sat Dec 24, 2011 5:55 am

BillyBoyo wrote:You're going to need to show us some of the output from your job.

Are you using ISPF? Do you have access to SDSF or something else to look at "spool output files" with? Outlst, maybe?



Here the SDSF:


********************************* TOP OF DATA **********************************
J E S 2 J O B L O G -- S Y S T E M M V S T -- N O D

18.11.01 JOB06448 ---- FRIDAY, 23 DEC 2011 ----
18.11.01 JOB06448 IRR010I USERID UK00242 IS ASSIGNED TO THIS JOB.
18.11.01 JOB06448 ICH70001I UK00242 LAST ACCESS AT 17:57:26 ON FRIDAY, DECEMBE
18.11.01 JOB06448 $HASP373 ADDMATR STARTED - INIT 1 - CLASS A - SYS MVST
18.11.01 JOB06448 IEF403I ADDMATR - STARTED - TIME=18.11.01
18.11.01 JOB06448 - --TIMINGS (MINS.)--
18.11.01 JOB06448 -JOBNAME STEPNAME PROCSTEP RC EXCP CPU SRB CLOCK
18.11.01 JOB06448 -ADDMATR ADDMATR 99 183 .00 .00 .00
18.11.01 JOB06448 IEF404I ADDMATR - ENDED - TIME=18.11.01
18.11.01 JOB06448 -ADDMATR ENDED. NAME- TOTAL CPU TIME=
18.11.01 JOB06448 $HASP395 ADDMATR ENDED
------ JES2 JOB STATISTICS ------
23 DEC 2011 JOB EXECUTION DATE
20 CARDS READ
67 SYSOUT PRINT RECORDS
0 SYSOUT PUNCH RECORDS
3 SYSOUT SPOOL KBYTES
0.00 MINUTES EXECUTION TIME
1 //ADDMATR JOB MSGCLASS=H,NOTIFY=&SYSUID
IEFC653I SUBSTITUTION JCL - MSGCLASS=H,NOTIFY=UK00242
2 //ADDMATR EXEC PGM=IKJEFT01,
// PARM='DSN SYSTEM(DB1S)'
3 //STEPLIB DD DISP=SHR,DSN=DB2.V9R1.SDSNLOAD
4 // DD DISP=SHR,DSN=ZOS.CONTEST2.PART2.LOAD
5 //SYSTSIN DD *
6 //SYSTSPRT DD SYSOUT=*
7 //ADDMATR DD SYSOUT=*
8 //SYSOUT DD SYSOUT=*
ICH70001I UK00242 LAST ACCESS AT 17:57:26 ON FRIDAY, DECEMBER 23, 2011
IEF236I ALLOC. FOR ADDMATR ADDMATR
IGD103I SMS ALLOCATED TO DDNAME STEPLIB
IGD103I SMS ALLOCATED TO DDNAME
IEF237I JES2 ALLOCATED TO SYSTSIN
IEF237I JES2 ALLOCATED TO SYSTSPRT
IEF237I JES2 ALLOCATED TO ADDMATR
IEF237I JES2 ALLOCATED TO SYSOUT
IEF142I ADDMATR ADDMATR - STEP WAS EXECUTED - COND CODE 0099
IGD104I DB2.V9R1.SDSNLOAD RETAINED, DDNAME=STEPLIB
IGD104I ZOS.CONTEST2.PART2.LOAD RETAINED, DDNAME=
IEF285I UK00242.ADDMATR.JOB06448.D0000101.? SYSIN
IEF285I UK00242.ADDMATR.JOB06448.D0000102.? SYSOUT
IEF285I UK00242.ADDMATR.JOB06448.D0000103.? SYSOUT
IEF285I UK00242.ADDMATR.JOB06448.D0000104.? SYSOUT
IEF373I STEP/ADDMATR /START 2011357.1811
IEF374I STEP/ADDMATR /STOP 2011357.1811 CPU 0MIN 00.02SEC SRB 0MIN 00.00S
IEF375I JOB/ADDMATR /START 2011357.1811
IEF376I JOB/ADDMATR /STOP 2011357.1811 CPU 0MIN 00.02SEC SRB 0MIN 00.00S
DSN
RUN PLAN(ADDMATR) PROGRAM(ADDMATR)
DSN
END

ERROR:
Problem opening PARMS DD. COBOL File status key = 35

******************************** BOTTOM OF DATA ********************************

This is the original version and of course I have to supply the parameters. I am supposed to supply these integers to the JCL using in-stream data. I hope someone can help me.
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:11 am

Problem opening PARMS DD. COBOL File status key = 35
This is typically called "a clue". It is telling you that DD name PARMS is required yet is not present in your JCL. Perhaps the programmer expects you to put your parameter in there?
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: How to supply parameter

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

Robert Sample wrote:
Problem opening PARMS DD. COBOL File status key = 35
This is typically called "a clue". It is telling you that DD name PARMS is required yet is not present in your JCL. Perhaps the programmer expects you to put your parameter in there?



I have already got the statement PARM='DSN SYSTEM(DB1S)' do you suggest me to add another one or something else?
clapclash
 
Posts: 26
Joined: Fri Dec 23, 2011 9:10 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post