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

Sort card for dates


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Oct 28, 2011 6:51 pm
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
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
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 Developer


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

PostPosted: Tue Nov 01, 2011 11:50 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top