View previous topic :: View next topic
|
Author |
Message |
raghavendra_p_sarvade
New User
Joined: 17 Oct 2006 Posts: 32
|
|
|
|
Hi,
I have a simple flat file where I have a date value. I need to get this as a JCL variable for my process.
How can I do it? Thanks!
Thanks,
Raghav |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You need to post an example of what you have as input and what you want as output.
It is likely that the solution will be creating new jcl in "this" process and submitting another. . . This has been discussed several times before. |
|
Back to top |
|
|
raghavendra_p_sarvade
New User
Joined: 17 Oct 2006 Posts: 32
|
|
|
|
//STEP0015 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=USERID1.FILE.NAME,DISP=SHR
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *
Here the file USERID1.FILE.NAME will have only one record with only the date in it.
**********
100517
**********
This value (100517) has to be assigned to a JCL variable (for example S1) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Yup, in the first process read the date and generate new jcl with the value in it. Then submit the new jcl which now has the needed value.
Do you really want to copy this "date file" to another just like it? Why? If you won't post the actual requirement, you will not get useful replies. . . |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
And didn't we already go over this scenario here? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Kevin,
Good catch
I guess to some it is ok to waste everyone's time asking the same thing over and over. . .
Who knows, maybe IBM might have changed how things work recently. . .
d |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Raghav,
Can you show more details. What will the JCL that will use the S1 variable look like? Is it another sort step or something else? Please elaborate. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You take the value from the file, USERID1.FILE.NAME, and write it into a member of a PDS in the correct format, such as:
Code: |
SYSX PROD.PDS(CURRDATE) - 01.00 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 // SET DATE=100517
****** **************************** Bottom of Data ****************************
|
so that now you can use that PDS in any subsequent jobs and have that value for the variable, such as:
Code: |
//JOB2 JOB (......)
//*
// JCLLIB ORDER=PROD.PDS
// INCLUDE CURRDATE
//*
... |
|
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Some installations frown on INCLUDEing a member that is not maintained thru change control. |
|
Back to top |
|
|
|