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

Sort to write day of week


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

New User


Joined: 30 Sep 2006
Posts: 60

PostPosted: Wed Oct 29, 2008 8:34 pm
Reply with quote

Hi,

I have a requirement to write the day of the week (Sunday, Monday etc or a number indicating the same) to an output file. Can this be done using sort?

Thanks,
Aneesh.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Oct 29, 2008 8:53 pm
Reply with quote

Aneesh,

The following DFSORT/ICETOOL job will give you the desired results.It will write a three byte value for the day of week. mon, tue, wed, thu, fri, sat, sun

Code:

//STEP0100 EXEC PGM=ICEMAN     
//SYSOUT   DD SYSOUT=*   
//SYMNAMES DD *               
MYDAY,S'&LWDAY'       
//SORTIN   DD *               
SAMPLE                         
//SORTOUT  DD SYSOUT=*         
//SYSIN    DD *               
  SORT FIELDS=COPY             
  INREC BUILD=(MYDAY)   
//*                           
Back to top
View user's profile Send private message
Aneesh

New User


Joined: 30 Sep 2006
Posts: 60

PostPosted: Wed Oct 29, 2008 8:58 pm
Reply with quote

Thank you icon_smile.gif
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(F1 & F2) and writ... JCL & VSAM 8
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 Write line by line from two files DFSORT/ICETOOL 7
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top