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 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: 1504
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: 1504
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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


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