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

How to add date field to the dataset as a last column?


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

New User


Joined: 08 Sep 2008
Posts: 43
Location: india

PostPosted: Thu May 21, 2009 2:16 pm
Reply with quote

Hi,

I have a requirement like, one dataset has the data with record length 156. Now I want to add current date in the last column for FTP purpose by using JCL.
Can any one please help me.


Thanks in advance
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu May 21, 2009 2:20 pm
Reply with quote

Why do you need to add the date / time for FTP
Back to top
View user's profile Send private message
umasankarmf

New User


Joined: 08 Sep 2008
Posts: 43
Location: india

PostPosted: Thu May 21, 2009 2:30 pm
Reply with quote

Hi expat,

Thanx for the reply. Everyday it will create the dataset. Now client wants that data as report. So he wants the run date in that dataset.

Can you please give me the code for that.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu May 21, 2009 2:46 pm
Reply with quote

Quote:
Can you please give me the code for that.


Suggest you look at DFSORT. The JCL for this utility could be added as an intermediate Step in your JOB.

Either look thru the posts in the DFSORT forum or refer to the DFSORT references. If you use syncsort, look at the syncsort manuals at your site.
Back to top
View user's profile Send private message
umasankarmf

New User


Joined: 08 Sep 2008
Posts: 43
Location: india

PostPosted: Thu May 21, 2009 2:54 pm
Reply with quote

Hi Dick,

Thanks for your reply. Yes you are correct I have to use the intermediate step. Can you tell me that logic.
Back to top
View user's profile Send private message
umasankarmf

New User


Joined: 08 Sep 2008
Posts: 43
Location: india

PostPosted: Thu May 21, 2009 3:00 pm
Reply with quote

Hi,

I know how to get the current date. Can any body help me how add that date to the dataset in the last column.

I got the date by using the following jcl.
//PS123 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD DSN=B053PXL.DATE.TEST,DISP=SHR
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(DATENS=(MDY))
/*
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu May 21, 2009 9:50 pm
Reply with quote

If you want to add an mmddyy date in positions 151-156 of every record, you can use these DFSORT control statements:

Code:

  OPTION COPY                       
  INREC OVERLAY=(151:DATENS=(MDY))   
Back to top
View user's profile Send private message
umasankarmf

New User


Joined: 08 Sep 2008
Posts: 43
Location: india

PostPosted: Mon May 25, 2009 6:29 pm
Reply with quote

Hi Frank,

Thanks for your valuable suggestion. Its working fine. But I had done in other way. Any way your code is working. Thanks a lot.
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top