passing contents of Dataset as Parameter



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

passing contents of Dataset as Parameter

Postby zaino22 » Wed May 27, 2009 3:00 am

I have a Date as a content of the dataset within the JCL, and I want to pass this value as a parameter to another program? Is there any way I can do that?
zaino22
 
Posts: 7
Joined: Tue Mar 17, 2009 11:00 pm
Has thanked: 0 time
Been thanked: 0 time

Re: passing contents of Dataset as Parameter

Postby dick scherrer » Wed May 27, 2009 4:19 am

Hello,

Yes, create "new" jcl dynamically including the date from the dataset and submit this new jcl via the internal reader. The submitted jcl could have this date as the parm.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: passing contents of Dataset as Parameter

Postby zaino22 » Fri May 29, 2009 8:48 am

Can you paste any samples with a bit of explanation? I'll appreciate it.
zaino22
 
Posts: 7
Joined: Tue Mar 17, 2009 11:00 pm
Has thanked: 0 time
Been thanked: 0 time

Re: passing contents of Dataset as Parameter

Postby dick scherrer » Fri May 29, 2009 9:42 am

Hello,

Think about the jcl you want to run. It will be a JOB, at least one EXEC with a parm, and some DD statements. Whatever this jcl, it should be the "sample" you generate.

I believe i also mis-read your initial post. Do you really want to use a dataset name as a parm to a program? When i read this originally, i thought you wanted to use a dataset name from a file in a dd statement (possibly using a symbolic parm.

Maybe it will help if you post the jcl you want to execute and explain where the parm comes in and how the parm would be used in the process.

Sorry for getting lost. . . :oops:
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: passing contents of Dataset as Parameter

Postby zaino22 » Thu Jun 04, 2009 10:50 pm

I want to read the contents of the dataset and pass the content as PARAMETER. Please provide an example of that sort, if it is possible to do in JCL.

thanks,
zaino22
 
Posts: 7
Joined: Tue Mar 17, 2009 11:00 pm
Has thanked: 0 time
Been thanked: 0 time

Re: passing contents of Dataset as Parameter

Postby MrSpock » Fri Jun 05, 2009 12:02 am

What is the RECFM and LRECL of the input dataset? What is the format and position of the data you need within that dataset? What is the required output dataset RECFM and LRECL?

Could you provide some examples of the input data format as well as the required output data format?
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: passing contents of Dataset as Parameter

Postby rajas.abcdefg » Sun Jul 26, 2009 5:41 am

Hi,

I too have the similar problem.

For my issue, the Record length is 80. Date is in the format of DD/MM/YYYY.

Please advise me how can I get this..

Sample JCL's are apprcieable.
rajas.abcdefg
 
Posts: 38
Joined: Thu Jul 09, 2009 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: passing contents of Dataset as Parameter

Postby dick scherrer » Sun Jul 26, 2009 6:41 am

Hello,

You need to show what you want - we have no idea of your requirement. How might we post "Sample JCL's" knowing nothing about your requirement. . .?

You also need to show what you "have" that is to be used getting to what you want.

Keep in mind that your request is completely clear to you, but may not be to others who read the request.

Most of the effort of the forums is getting the requirement properly defined. . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: passing contents of Dataset as Parameter

Postby rajas.abcdefg » Sun Jul 26, 2009 11:02 pm

I am trying to create a dataset with yesterday's date as the extension. So, by using sort card I have got the required date(i.e. yersterday's date) as below.

********************************* Top of Data **********************************
072509
******************************** Bottom of Data ********************************
Strictly using JCL, now I need to copy the contents of dataset(PROD.EMPLYO.FILE) of Rec Length 120 to the new dataset which as the above date in dataset name.

For e.g. My new dataset name has to looks as, DEVELOP.EMPLYO.FILE.Z072509 with the same disp parameters as that of PROD.EMPLYO.FILE

I think this information might help you.
rajas.abcdefg
 
Posts: 38
Joined: Thu Jul 09, 2009 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: passing contents of Dataset as Parameter

Postby dick scherrer » Sun Jul 26, 2009 11:11 pm

Hello,

Strictly using JCL, now I need to copy the contents
Sorry - No, not a chance. . . . :? JCL cannot do this. JCL cannot copy - some program does.

Is there a second copy needed? Would changing the name of the original dataset accomplish what you need? If a copy is needed, which utility do you plan on using (suggest your sort product as the sort does this very well)?

You need to show all of the jcl you want executed, including the customized dataset name.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post