MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Current Day (e.g. FRIDAY) using SORT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
aniket
Beginner


Joined: 27 May 2005
Posts: 14
Topics: 8

PostPosted: Thu Nov 06, 2008 3:15 pm    Post subject: Current Day (e.g. FRIDAY) using SORT Reply with quote

Hi, Is there any way by which we can get current day of the week, I mean not the numeric date, but alphabetic day (e.g. FRIDAY) using SORT?
_________________
Thanks,

Aniket.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Nov 06, 2008 3:29 pm    Post subject: Reply with quote

You can use a DFSORT symbol for &WDAY or &LWDAY to get a 3-char current day name (e.g. THU for today). Here's an example:

Code:

//S1    EXEC  PGM=ICEMAN     
//SYSOUT    DD  SYSOUT=*     
//SYMNAMES DD *             
DAY,S'&WDAY'                 
//SORTIN DD *               
RECORD 1                     
//SORTOUT DD SYSOUT=*       
//SYSIN    DD    *           
  OPTION COPY               
  INREC BUILD=(C'Today is ',DAY)         
/*


SORTOUT would have:

Code:

Today is THU


Of course, if you really need the full name (e.g. THURSDAY), you could run the 3-character code through DFSORT's CHANGE operand.

If you give more details of what you want to do exactly, I could be more specific.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group