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

Remove the spaces that are of 4 bytes at the 279th position


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
loverj24

New User


Joined: 05 Jul 2007
Posts: 16
Location: bangalore

PostPosted: Fri Dec 05, 2008 4:56 pm
Reply with quote

Hi,

I have a FB file whose length is 297. At 279 position records are like this
Code:
0000000 Col 218 297
   Scroll ===> CSR 
--8----+----9----+--
********************
|1234 0882|011010887
|1234 0882|011010884
|     0882|011010878
|     0882|011010888
|     2218|011009928
|     1234|011001320
|1234 0887|011011914
|     0887|011011520
|     0611|011013015
********************


I need the out put like
Code:
|1234 0882|011010887
|1234 0882|011010884
|0882|011010878     
|0882|011010888     
|2218|011009928     
|1234|011001320     
|1234 0887|011011914
|0887|011011520     
|0611|011013015     
********************


I need to remove the spaces that are of 4 bytes at the 279th position.
Please help me regarding this
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: Fri Dec 05, 2008 11:10 pm
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/297)
//SORTOUT DD DSN=...  output file (FB/297)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(279,1,CH,EQ,C' '),
     OVERLAY=(279:279,19,JFY=(SHIFT=LEFT)))
/*
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Dec 06, 2008 9:59 am
Reply with quote

Frank,

Quote:
spaces that are of 4 bytes at the 279th position.


As OP wanted to check for 4 bytes spaces, we can very well check for 4 spaces instead of one.
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: Sun Dec 07, 2008 5:53 am
Reply with quote

Checking for 1 space will work for the example records shown, but the OP can certainly check for 4 spaces if necessary with

Code:

279,4,CH,EQ,C' '
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Dec 08, 2008 3:47 pm
Reply with quote

Quote:
Checking for 1 space will work for the example records shown, but the OP can certainly check for 4 spaces if necessary with


Thanks Frank.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Remove leading zeroes SYNCSORT 4
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Cobol program with sequence number ra... COBOL Programming 5
Search our Forums:

Back to Top