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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Remove the spaces that are of 4 bytes at the 279th position
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 Moderator


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

PostPosted: Fri Dec 05, 2008 11:10 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Sat Dec 06, 2008 9:59 am    Post subject: Reply to: Remove the spaces that are of 4 bytes at the 279th
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 Moderator


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

PostPosted: Sun Dec 07, 2008 5:53 am    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Mon Dec 08, 2008 3:47 pm    Post subject: Reply to: Remove the spaces that are of 4 bytes at the 279th
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    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 Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm


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