Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need help to copy a DATE appended Dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Need help to copy a DATE appended Dataset
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

Moderator Team Head


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

PostPosted: Tue Jun 03, 2008 8:03 pm    Post subject: Reply to: Need help to copy a DATE appended Dataset
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

Site Director


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

PostPosted: Wed Jun 04, 2008 12:21 am    Post subject:
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    Post subject: Reply to: Need help to copy a DATE appended Dataset
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us