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

Customizing a unique OUTFIL timestamp in my output records ?


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

New User


Joined: 02 Mar 2006
Posts: 7
Location: New York City

PostPosted: Tue May 02, 2006 9:27 pm
Reply with quote

Hi everyone,

I've looked through IBM's site and did a good share of googling for this
and I'm finding formats but nothing comparable to Oracle's date format which I need for an automated interface.

DFSORT seems to only have a numeric month and I need a literal
such as: JAN, FEB, DEC, SEP, etc. ................


The Oracle format is "dd-mmm-yy"
examples: '01-JAN-06' '20-JUL-66'



Thanks in Advance

George Lewycky
NY City Transit
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue May 02, 2006 10:41 pm
Reply with quote

DFSORT does not have a built-in function for that type of date, but you can easily create it as a DFSORT symbol, so you can use it wherever you want to. Here's a DFSORT step to create a symbol in the form:

MYDATE,'dd-mmm-yy'

Code:

//DATE  EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
* Get dd-mm-yy
  INREC FIELDS=(DATE=(DMY-))
* Create DFSORT Symbol as follows:
* MYDATE,'dd-mmm-yy'
* where mmm is a literal for the month.
  OUTREC FIELDS=(C'MYDATE,''',1,3,4,2,CHANGE=(3,
       C'01',C'JAN',C'02',C'FEB',C'03',C'MAR',C'04',C'APR',
       C'05',C'MAY',C'06',C'JUN',C'07',C'JUL',C'08',C'AUG',
       C'09',C'SEP',C'10',C'OCT',C'11',C'NOV',C'12',C'DEC'),
       6,3,C'''',80:X)
/*


Here's an example of a subsequent DFSORT step that uses MYDATE:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=... output file
//SYSIN    DD    *
  OPTION COPY
  OUTFIL HEADER1=(MYDATE)
/*
Back to top
View user's profile Send private message
grlewycky

New User


Joined: 02 Mar 2006
Posts: 7
Location: New York City

PostPosted: Tue May 02, 2006 11:05 pm
Reply with quote

Where would we be without you !!!!!!
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed May 03, 2006 12:14 am
Reply with quote

Back in the stone age? icon_lol.gif

As a native New Yorker who fled to California, I'm always happy to help the NY City Transit Authority. icon_wink.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 and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top