Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Customizing a unique OUTFIL timestamp in my output records ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Customizing a unique OUTFIL timestamp in my output records ?
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 Moderator


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

PostPosted: Tue May 02, 2006 10:41 pm    Post subject:
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    Post subject: Thanks again Frank!!!
Reply with quote

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

DFSORT Moderator


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

PostPosted: Wed May 03, 2006 12:14 am    Post subject:
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    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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us