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 Date YYMM in sort

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


Joined: 26 Apr 2007
Posts: 5
Topics: 2

PostPosted: Thu Jul 10, 2008 5:25 pm    Post subject: Current Date YYMM in sort Reply with quote

I can output a field from an OUTREC statement using DFOSRT using DATE(YMD.) producing YY.MM.DD but what if I only want the Year and Month without and separator?

example: 0807 (July 08)


Any help would be appreciated.
_________________
John
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 Jul 10, 2008 5:53 pm    Post subject: Reply with quote

You can create a DFSORT symbol for 'yymm' and use it in OUTREC like this:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT   DD SYSOUT=*
//SYMNAMES DD *
YM,S'&YR2.&MON'
/*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=...  output file
//SYSIN   DD   *
   OPTION COPY
   OUTREC BUILD=(YM)
/*

_________________
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
jbrasher
Beginner


Joined: 26 Apr 2007
Posts: 5
Topics: 2

PostPosted: Fri Jul 11, 2008 11:16 am    Post subject: Reply with quote

Thanks again Frank, your the best. Very Happy
_________________
John
Back to top
View user's profile Send private message
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