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

To add dynamic month/year on the output file generated


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 25, 2010 7:28 pm
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: 577
Location: USA

PostPosted: Wed Aug 25, 2010 7:55 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top