View previous topic :: View next topic |
Author |
Message |
sub Beginner
Joined: 30 Jan 2007 Posts: 20 Topics: 12
|
Posted: Tue Dec 08, 2009 9:59 pm Post subject: Single quotes in Sort |
|
|
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 |
|
 |
Ram Beginner

Joined: 12 Jan 2004 Posts: 53 Topics: 12
|
Posted: Wed Dec 09, 2009 4:54 am Post subject: |
|
|
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 |
|
 |
|
|