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
 

 

Date formatting using SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nimisanand

New User


Joined: 22 Nov 2005
Posts: 23

PostPosted: Thu Dec 11, 2008 9:39 am    Post subject: Date formatting using SYNCSORT
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: 2181
Location: @my desk

PostPosted: Thu Dec 11, 2008 10:41 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


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