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

Sort card required for : with specific date formats


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Thu Mar 12, 2009 5:50 pm
Reply with quote

Dear Experts,

Requirement:

Sort card to write the following 3 lines to a new output file say PROD.DBEXT.CM1100D.NDMCARD.

This job runs daily.

The last parameter (date format) in the file-name should be changed automatically.


&IDSN1='PROD.DBEXT.CM1100D.D031209' -
&ODSN1='icausr_234_cap_20090312.txt'
SIGNOFF
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Mar 12, 2009 9:11 pm
Reply with quote

mkk157,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                         
&IDSN1='PROD.DBEXT.CM1100D.D031209' -                   
&ODSN1='ICAUSR_234_CAP_20090312.TXT'                     
SIGNOFF                                                 
//SORTOUT  DD SYSOUT=*                                   
//SYSIN    DD *       
  SORT FIELDS=COPY                                             
  INREC IFOUTLEN=80,                                           
  IFTHEN=(WHEN=(1,6,CH,EQ,C'&IDSN1'),OVERLAY=(29:DATENS=(MDY))),
  IFTHEN=(WHEN=(1,6,CH,EQ,C'&ODSN1'),OVERLAY=(24:DATE1))       
/*
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top