View previous topic :: View next topic
|
Author |
Message |
pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
I want to add current date and time as last qualifiers in a file.
How can i do it????
I need the file like
testfile.d20060104.t144650 |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 419 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
note - dataset name nodes limited to 8 characters
Dave |
|
Back to top |
|
|
pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
Thanks SUPERK. It worked.
But why have to execute as 2 jobs in the same jcl???
what does this EZACFSM1 do???
When i remove the second job card and try to run this only STEP0100 is running. Can you please explain.
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
Ok, that explained lot many things to me.
Again, is there a way to do all this in a single job rather than calling a second job.
|
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 419 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
some job scheduling products do this
Dave |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Here's one of many possibilities:
Code: |
//STEP0001 EXEC PGM=...
//...
//SYSUT2 DD DSN=TESTFILE,DISP=(,CATLG),UNIT=SYSDA,
// SPACE=(CYl,(1,1),RLSE
//*
//STEP0002 EXEC PGM=EZACFSM1
//SYSOUT DD DSN=&&CNTL,DISP=(,PASS),
// UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)
//SYSIN DD *
ALTER 'TESTFILE' -
NEWNAME('TESTFILE.D&YR2&MON&DAY..T&HR&MIN&SEC')
/*
//*
//STEP0003 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=&&CNTL,DISP=(OLD,DELETE)
//*
|
If you would go through all of those links, you'll find a lot of other alternatives, as well as considering Dave's suggestion. |
|
Back to top |
|
|
pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
Code: |
//jobname JOB (),' STEP 1 ',
//STEP01 EXEC PGM=EZACFSM1
//SYSOUT DD SYSOUT=(*,INTRDR)
//SYSIN DD DATA
//jobname JOB (),' STEP 2 ',
//STEPK1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSOUT DD *
//SYSUT1 DD DSN=input,
// DISP=SHR
//SYSUT2 DD DSN=input.D&MON.&DAY,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(1,2),RLSE),
// UNIT=SYSDA,
// DSORG=PS,
// LRECL=900,
// RECFM=FB
//SYSIN DD DUMMY
/*
|
This job is running fine and giving me the desired output.
But why I have to use another job within the same job?????
What is the erason behind this????
Is there any way by which I can run the second part as just another step in the same jcl itself rather than doing it as a different job. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
pjnithin wrote: |
Is there any way by which I can run the second part as just another step in the same jcl itself rather than doing it as a different job. |
Yes, as was shown in the posts:
Code: |
//jobname JOB (),' STEP 2 ',...
// SET MON=01
// SET DAY=06
//STEPK1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSOUT DD *
//SYSUT1 DD DSN=input,
// DISP=SHR
//SYSUT2 DD DSN=input.D&MON.&DAY,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(1,2),RLSE),
// UNIT=SYSDA,
// DSORG=PS,
// LRECL=900,
// RECFM=FB
//SYSIN DD DUMMY
|
Or, again, as Dave had suggested, use the system variables provided by your job scheduling system. |
|
Back to top |
|
|
|