IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help to copy a DATE appended Dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Puspojit

New User


Joined: 10 Mar 2008
Posts: 34
Location: Pune

PostPosted: Tue Jun 03, 2008 7:56 pm
Reply with quote

Hi ,

I have a job containing three steps at first each producing an O/P dataset.
From the fourth step onwards, there are few more steps coded to append Date field at the end of the name of each Dataset....
Eg: Step 1 produces a file : TEST1.DATA.SORT
Step 4 will alter the name of this Dataset and the new name shall
be TEST1.DATA.SORT.D080603...(By using EZACFSM1)
On similar lines ,the remaining two file names are also appended with Date Value.

Now, I have an additional task to write the names of the new file names
thus created as records in another file,say, TEST.MASTER.FILE.

Thus at the end of the job, the file TEST.MASTER.FILE shall contain three records,
TEST1.DATA.SORT.D080603
TEST2.DATA.SORT.D080603
TEST3.DATA.SORT.D080603

Could anyone please advise how to proceed on to create the
TEST.MASTER.FILE ?

The code I used to create the file TEST1.DATA.SORT.D080603 is
Code:

//STEP0004 EXEC PGM=EZACFSM1
//SYSOUT   DD   DSN=&&CNTL,DISP=(,PASS),
//         UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)
//SYSIN    DD   *
    ALTER 'TEST1.DATA.SORT'  -
    NEWNAME('TEST1.DATA.SORT.D&YR2&MON&DAY')
/*
//*
//STEP0005 EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   DSN=&&CNTL,DISP=(OLD,DELETE)
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jun 03, 2008 8:03 pm
Reply with quote

Couldn't you retrieve that detail from the SYSPRINT output of each of the IDCAMS steps?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 04, 2008 12:21 am
Reply with quote

Hello,

You might consider a "front-end" process that would create the exedcution jcl with the needed final dataset names already resolved. The "correct" jcl could then be submitted via the internal reader and ther would be no need for keeping track of file names and renaming datasets.

If you are not familiar with the internal reader, there are multiple topics in the forum. If you read something that is not clear, post what you read and what is not clear and we will help clarify.
Back to top
View user's profile Send private message
Puspojit

New User


Joined: 10 Mar 2008
Posts: 34
Location: Pune

PostPosted: Wed Jun 04, 2008 2:31 pm
Reply with quote

Hi Kevin

Thanks a lot.....I got the file names from the SYSPRINT statements and then ran a sort step eliminating all the un necessary information contained in the SYSPRINT file and extracting only the new file names.
Dick,
Regarding the Internal Reader, I donno much about it and since the requirement was met using the Sysyprint itself so I did nt go through
the "Front End" process............Anyways, thanks for the info...it can surely come handy in my future tasks.....

Thanks and Regards,
Puspojit
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top