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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to add date field to the dataset as a last column?
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: 8593
Location: Back in jolly old England

PostPosted: Thu May 21, 2009 2:20 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu May 21, 2009 9:50 pm    Post subject:
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    Post subject:
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    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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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