View previous topic :: View next topic |
Author |
Message |
jbrasher Beginner
Joined: 26 Apr 2007 Posts: 5 Topics: 2
|
Posted: Thu Jul 10, 2008 5:25 pm Post subject: Current Date YYMM in sort |
|
|
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 |
|
 |
Frank Yaeger Sort Forum Moderator

Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Thu Jul 10, 2008 5:53 pm Post subject: |
|
|
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 |
|
 |
jbrasher Beginner
Joined: 26 Apr 2007 Posts: 5 Topics: 2
|
Posted: Fri Jul 11, 2008 11:16 am Post subject: |
|
|
Thanks again Frank, your the best.  _________________ John |
|
Back to top |
|
 |
|
|