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

Problem in SORT when putting single quotes


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kaushik8205

New User


Joined: 10 Nov 2006
Posts: 49
Location: Canada

PostPosted: Mon Feb 26, 2007 5:47 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Feb 26, 2007 6:50 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Feb 26, 2007 9:38 pm
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top