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
 

 

Sort card for dates

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Mazahar

New User


Joined: 11 Dec 2007
Posts: 82
Location: hyderabad

PostPosted: Fri Oct 28, 2011 6:25 pm    Post subject: Sort card for dates
Reply with quote

Hello All

I have a requirement to remove the spaces from date card, Can you please suggest

I am picking below dates from a 80 byte FB file and write it to a 80 byte FB file

Code:
JANUARY 26,2011
FEBRURY 26,2011
MARCH   26,2011
APRIL   26,2011
MAY     26,2011
JUNE    26,2011
JULY    26,2011


expected output is by by keeping only one space between month and date.

Code:
JANUARY 26,2011
FEBRURY 26,2011
MARCH 26,2011
APRIL 26,2011
MAY 26,2011
JUNE 26,2011
JULY 26,2011
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Oct 28, 2011 6:51 pm    Post subject: Reply to: Sort card for dates
Reply with quote

Try giving it a squeeze. Look up SQZ in the DFSORT manual.
Back to top
View user's profile Send private message
elango_K

New User


Joined: 18 Aug 2011
Posts: 44
Location: India

PostPosted: Fri Oct 28, 2011 7:01 pm    Post subject:
Reply with quote

Use this:


Code:
//SYSIN   DD *                               
  OPTION COPY                                 
  INREC BUILD=(1,80,SQZ=(SHIFT=LEFT,MID=C' '))
Back to top
View user's profile Send private message
Mazahar

New User


Joined: 11 Dec 2007
Posts: 82
Location: hyderabad

PostPosted: Fri Oct 28, 2011 9:43 pm    Post subject:
Reply with quote

Elango,

Thank You so much, It worked. Is there any chance we can put a "," after the date?

Input is something different with out a comma after the date..

Code:

JANUARY 26 2011
FEBRURY 26 2011
MARCH   26 2011
APRIL   26 2011
MAY     26 2011
JUNE    26 2011
JULY    26 2011


expected output is

Code:
JANUARY 26,2011
FEBRURY 26,2011
MARCH 26,2011
APRIL 26,2011
MAY 26,2011
JUNE 26,2011
JULY 26,2011
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 Nov 01, 2011 11:50 pm    Post subject:
Reply with quote

You can use a DFSORT job like the following:

Code:

//S1 EXEC PGM=SORT                                               
//SYSOUT DD SYSOUT=*                                             
//SORTIN DD *                                                   
JANUARY 26 2011                                                 
FEBRURY 26 2011                                                 
MARCH   26 2011                                                 
APRIL   26 2011                                                 
MAY     26 2011                                                 
JUNE    26 2011                                                 
JULY    26 2011                                                 
//SORTOUT DD SYSOUT=*                                           
//SYSIN DD *                                                     
  OPTION COPY                                                   
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(11:C',')),                   
    IFTHEN=(WHEN=INIT,BUILD=(1,80,SQZ=(SHIFT=LEFT,MID=C' ')))   
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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


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