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

Date formatting using SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nimisanand

New User


Joined: 22 Nov 2005
Posts: 24

PostPosted: Thu Dec 11, 2008 9:39 am
Reply with quote

Hi,

I have a sort card

SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(2,15,CH,EQ,C'BUSINESS DATE :'),
OVERLAY=(17:DATE))

This gives me the date in the format BUSINESS DATE :12/10/08.

My requirement is to replace the slashes with '-' such that the output looks like

BUSINESS DATE :12-10-08.

Can some modifications be done in the sort card to meet my requirement?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Dec 11, 2008 10:41 am
Reply with quote

Quote:
Can some modifications be done in the sort card to meet my requirement?
Yes, Of course.
Code:
//STEP1    EXEC PGM=SORT                           
//SYSOUT   DD SYSOUT=*                             
//SORTIN   DD *                                     
 BUSINESS DATE :                                   
//SORTOUT  DD SYSOUT=*                             
//SYSIN    DD *                                     
 SORT FIELDS=COPY                                   
 INREC IFTHEN=(WHEN=(2,15,CH,EQ,C'BUSINESS DATE :'),
 OVERLAY=(17:DATE=(MDY-))) 


SORTOUT
Code:
 BUSINESS DATE :12-10-08
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
Search our Forums:

Back to Top