Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us