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

Remove blank spaces in the records


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1742
Location: Tirupur, India

PostPosted: Wed Jan 19, 2011 8:28 pm
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
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: 1742
Location: Tirupur, India

PostPosted: Thu Jan 20, 2011 11:58 am
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

Superior Member


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

PostPosted: Thu Jan 20, 2011 7:20 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top