Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us