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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
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