View previous topic :: View next topic
|
Author |
Message |
Mazahar
New User
Joined: 11 Dec 2007 Posts: 82 Location: hyderabad
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Try giving it a squeeze. Look up SQZ in the DFSORT manual. |
|
Back to top |
|
|
elango_K
New User
Joined: 18 Aug 2011 Posts: 44 Location: India
|
|
|
|
Use this:
Code: |
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,80,SQZ=(SHIFT=LEFT,MID=C' ')) |
|
|
Back to top |
|
|
Mazahar
New User
Joined: 11 Dec 2007 Posts: 82 Location: hyderabad
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|