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
 
Remove blank spaces in the records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Wed Jan 19, 2011 8:08 pm    Post subject: Remove blank spaces in the records
Reply with quote

Hi,

Here is my requirement. Input file is FB and Rec Length=80.
Input file:-
AAA; 1;A2 ; 13.2
AAA;25;A ; 2.0
AAA; 3;A35 ;521.3
AAA; 4;A999; 51.7

My output file should be in
Output file:-

AAA;1;A2;13.2
AAA;25;A;2.0
AAA;3;A35;521.5
AAA;4;A999;51.7

Please Advise

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

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1541
Location: Chennai

PostPosted: Wed Jan 19, 2011 8:28 pm    Post subject:
Reply with quote

Hi,

You could use Change all command,

Code:
c all ' ' ''


What SORT product do you have?
If its DFSORT you could use,


Code:
//JS020    EXEC PGM=ICETOOL               
//TOOLMSG  DD SYSOUT=*                   
//DFSMSG   DD SYSOUT=*                   
//IN1      DD DISP=OLD,DSN=WELLS.SORTIN     <- Input file
//IN2      DD DISP=OLD,DSN=WELLS.SORTOUT   <- Output file
//SYSOUT   DD SYSOUT=*                   
//SYSUDUMP DD SYSOUT=*                   
//TOOLIN   DD *                           
  COPY FROM(IN1) TO(IN2) USING(CTL1)     
//CTL1CNTL DD *                           
  INREC FINDREP=(IN=C' ',OUT=C'')         
/*                                       


Hope it helps.
Back to top
View user's profile Send private message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Thu Jan 20, 2011 11:14 am    Post subject: Reply to: Remove blank spaces in the records
Reply with quote

Thanks Vasanth, i got the required output.


Regards
Trinadh
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1541
Location: Chennai

PostPosted: Thu Jan 20, 2011 11:58 am    Post subject:
Reply with quote

You could search for "smart DFSORT tricks" pdf document which has many useful programs like this and its a good tutorial.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Jan 20, 2011 7:20 pm    Post subject:
Reply with quote

You can also use PGM=SORT with
Code:
//SYSIN    DD    *                 
  OPTION COPY                       
  INREC FINDREP=(IN=C' ',OUT=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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

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