View previous topic :: View next topic
|
Author |
Message |
kaushik8205
New User
Joined: 10 Nov 2006 Posts: 49 Location: Canada
|
|
|
|
Hi,
My requirement is getting the 1st column data and putting in sortout.
But i want it to be within single quotes.
eg:-
Input File:-
111111
222222
333333
desired output:-
'111111',
'222222',
'333333',
Can anyone please suggest a solution to this. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I think this should work:
OUTREC=(C'''',1,6,C''',')
Quote: |
Use the 'literal string' subparameter to define a literal string. Specify the number of repetitions by specifying n immediately before it. An apostrophe within a literal string must be specified as a double apostrophe; for example, ? 'O"Leary'. |
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
kaushik8205,
Here's a DFSORT job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
111111
222222
333333
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC FIELDS=(C'''',1,6,C''',',80:X)
/*
|
|
|
Back to top |
|
|
|