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
 

 

To add dynamic month/year on the output file generated

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
RAJA-RAJA

New User


Joined: 11 Sep 2009
Posts: 10
Location: chennai

PostPosted: Wed Aug 25, 2010 11:48 am    Post subject: To add dynamic month/year on the output file generated
Reply with quote

Hi ,

My requirement is to add the mmyyyy (on all the records appended at the last position)on the file generated in the output through dfsort . Can we add through PARM (as i know that parm can be used to pass the data on cobol programs).
//step1 exec pgm=sort,PARM='&MMYYYY'

or while creating o/p file with the outrec command to have the mmyyyy appended on each record in the file at last position.
Back to top
View user's profile Send private message

smijoss

Active User


Joined: 30 Aug 2007
Posts: 114
Location: pune

PostPosted: Wed Aug 25, 2010 1:34 pm    Post subject:
Reply with quote

how do you plan to implement this date... show us ur job
Back to top
View user's profile Send private message
RAJA-RAJA

New User


Joined: 11 Sep 2009
Posts: 10
Location: chennai

PostPosted: Wed Aug 25, 2010 1:51 pm    Post subject: Reply to: To add dynamic month/year on the output file gener
Reply with quote

Hi,

The date replacement will be done by the job scheduler.

Thanks.
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 Aug 25, 2010 7:28 pm    Post subject:
Reply with quote

Hello,

To repeat. . .
Quote:
how do you plan to implement this date... show us ur job
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Wed Aug 25, 2010 7:55 pm    Post subject:
Reply with quote

RAJA-RAJA,
Quote:
while creating o/p file with the outrec command to have the mmyyyy appended on each record in the file at last position.


I am assuming you want current year and month appended at 81st position for an 80 byte FB input file. This will create 86 byte output file.

Code:
//SORT01   EXEC PGM=SORT                 
//SORTIN   DD  YOUR INPUT FILE FB80     
//SORTOUT  DD  YOUR OUTPUT FILE FB86...       
//SYSIN    DD  *                         
 INREC BUILD=(81:DATE2)                 
 SORT FIELDS=COPY                       
 OUTREC BUILD=(1,80,81:85,2,83:81,4)     
//SYSOUT   DD  SYSOUT=*                 
//SYSPRINT DD  SYSOUT=*                 
//SYSUDUMP DD  SYSOUT=D                 


Thanks,
Back to top
View user's profile Send private message
smijoss

Active User


Joined: 30 Aug 2007
Posts: 114
Location: pune

PostPosted: Wed Aug 25, 2010 9:06 pm    Post subject:
Reply with quote

well your it requirement was to pass date fro JOB scheduler
so i guess RAJA_RAJA should make things more clear !!
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts Reg:Displaying the particular month o... bhavana yalavarthi All Other Mainframe Topics 4 Sat Jul 08, 2017 8:13 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


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