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 

Single quotes in Sort

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


Joined: 30 Jan 2007
Posts: 20
Topics: 12

PostPosted: Tue Dec 08, 2009 9:59 pm    Post subject: Single quotes in Sort Reply with quote

Hi,
I am reading a file and writing the first 10 bytes of the input file into the output file. Also when I write the output file i need to include a single quotes (') before and after the value.

I don't know how to include the single quotes before and after a value. Can someone please help.

Input file
ABCD123456XXX
BCDE123456XXX
CDEF123456XXX
DEFG123456XXX

Expected output
'ABCD123456'
'BCDE123456'
'CDEF123456'
'DEFG123456'

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


Joined: 12 Jan 2004
Posts: 53
Topics: 12

PostPosted: Wed Dec 09, 2009 4:54 am    Post subject: Reply with quote

Try this code.


Code:
//STEP01 EXEC PGM=SORT                                         
//SORTIN  DD *                                                 
ABCD123456XXX                                                   
BCDE123456XXX                                                   
CDEF123456XXX                                                   
DEFG123456XXX                                                   
/*                                                             
//SORTOUT  DD SYSOUT=*                                         
//SYSOUT  DD SYSOUT=*                                           
//SYSIN   DD *                                                 
  SORT FIELDS=COPY                                             
  OUTREC FIELDS=(C'''',1,10,C'''',80:X)                         
/*                                                   
Back to top
View user's profile Send private message
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