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
 

 

Want to remove the space from a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
psriv20
Currently Banned

New User


Joined: 25 May 2009
Posts: 19
Location: Pune

PostPosted: Mon Sep 27, 2010 5:58 pm    Post subject: Want to remove the space from a file
Reply with quote

I have a big file which is work as input file for a program A. I ran the the job and it is giving SOC7. I analysed it and found that at cols 45 to 48 expected value should be numeric but there is some space. I want to remove the spaces.

For ex.
Current file:
AAAAAAAA BBBBBBBBBBB

I want
AAAAAAAABBBBBBBBBBB

Thanks
Back to top
View user's profile Send private message

prahalad

New User


Joined: 14 Sep 2010
Posts: 18
Location: Pune

PostPosted: Mon Sep 27, 2010 7:07 pm    Post subject:
Reply with quote

It seems that you want to shift data if there are spaces from pos 45 to 48.
If I am wrong then please correct me.
You can do it using SORT. Please use the following code:

Code:

INREC FINDREP=(IN=C' ',OUT='',STARTPOS=45,ENDPOS=48)
SORT FIELDS=COPY
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Mon Sep 27, 2010 7:22 pm    Post subject:
Reply with quote

psriv20,
What do you want to replace SPACES with? Do you want to reduce LRECL incase you find spaces?

For Example, all 4 bytes are spaces and assuming your input LRECL is 80, do you want to reduce LRECL to 76 or do you need initialize with some numeric?

Thanks,
Back to top
View user's profile Send private message
psriv20
Currently Banned

New User


Joined: 25 May 2009
Posts: 19
Location: Pune

PostPosted: Mon Sep 27, 2010 9:02 pm    Post subject:
Reply with quote

Yes ...
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Sep 27, 2010 9:52 pm    Post subject:
Reply with quote

Hello,

If you actually want help, suggest you answer questions completely. . .

Quote:
Yes ...
Nonsense. . .

You were asked 2 seperate questions and a third with an or and the best you can do is "yes". . .

Post enough input records to show all of the possible cases and the output wanted from the sample input.

If anyone other than our IBMers post "solutions" before you provide the info, it will be deleted.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 646
Location: Pennsylvania

PostPosted: Mon Sep 27, 2010 11:27 pm    Post subject:
Reply with quote

I found it strange that the example removes spaces (non-numeric) and
replaces it with BBBB (also non-numeric)

Poor example?
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 Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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