Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7314

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 To remove spaces from a VB file using... Selvarajars DFSORT/ICETOOL 2 Thu Jun 21, 2018 6:57 pm
This topic is locked: you cannot edit posts or make replies. To remove spaces in a variable length... Selvarajars JCL & VSAM 1 Thu Jun 21, 2018 1:07 pm
No new posts Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts SORT 3 files,extract specific fields ... Kiransr DFSORT/ICETOOL 13 Fri Mar 23, 2018 10:54 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us