MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need help in SQZ

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
rameshm
Beginner


Joined: 05 Jan 2006
Posts: 1
Topics: 1
Location: chennai

PostPosted: Tue Oct 27, 2009 5:57 am    Post subject: Need help in SQZ Reply with quote

there is a requirement as follows (lrecl=80, FB)

input
Code:

aaaaa|000345|000000| bbbb^^^^|^^^^|nnnnnn
 

output required is
Code:

aaaaa|000345||bbbb^^^^||nnnnnn
 

i.e., only zeros and spaces found between '|' needs to be removed and not the trailing or leading zeros&spaces between '|'

important---> ^ represents spaces or blanks (for clear notification i have used this notation Smile )

could anyone help out please?

Thanks
RameshM
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Oct 27, 2009 10:27 am    Post subject: Reply with quote

rameshm,

You can use the following DFSORT JCL to get the desired results

Code:

//STEP0100 EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD *                                       
AAAAA|000345|000000| BBBB    |    |NNNNNN             
//SORTOUT  DD SYSOUT=*                                 
//SYSIN    DD *                                       
  SORT FIELDS=COPY                                     
  INREC FINDREP=(IN=(C'|    |',C'|000000|'),OUT=C'||')
/*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group