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
 

 

Sort to write day of week

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sort to write day of week
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    Post subject: Reply to: Sort to write day of week
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    Post subject: Reply to: Sort to write day of week
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    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
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts Write R1 and R2 to OP1 and R1 to OP2 bhaskar_kanteti DFSORT/ICETOOL 10 Fri Mar 03, 2017 11:18 am


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