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

Sort for string having quote in it


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
amity.vikas

New User


Joined: 11 Jan 2006
Posts: 6

PostPosted: Fri Nov 23, 2007 11:38 am
Reply with quote

Hello,

I am facing a situation where i need to include all the strings having quote (') in it. However when i use include as given below(for STRING say D'SLIVA), job abends as it couldn't interpret string after first quote encounter.
INCLUDE COND=(1,STRLEN,CH,EQ,C'STRING')

Please advise.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Nov 23, 2007 11:45 am
Reply with quote

Vikas,

Were you trying this -

Code:
//S1    EXEC  PGM=SORT                 
//SYSOUT DD SYSOUT=*                   
//SYSPRINT DD SYSOUT=*                 
//SORTIN DD *                         
D'SILVA                               
DSILVA                                 
AAAAA'A                               
AAAAAAA                               
/*                                     
//SORTOUT DD SYSOUT=*                 
//SYSIN DD *                           
  SORT FIELDS=COPY                     
  INCLUDE COND=(1,8,SS,EQ,C'''')       
/*

o/p:

Code:
****************
D'SILVA         
AAAAA'A         
****************


Change sort card as per your need.
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Fri Nov 23, 2007 11:54 am
Reply with quote

murmokh,

it would be gud if u can explain a lil bit on the "SS" u used in the sort card..
Back to top
View user's profile Send private message
amity.vikas

New User


Joined: 11 Jan 2006
Posts: 6

PostPosted: Fri Nov 23, 2007 11:55 am
Reply with quote

Thanks Murali, its working!!
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Nov 23, 2007 12:00 pm
Reply with quote

raak,

Quote:
it would be gud if u can explain a lil bit on the "SS" u used in the sort card..


SS stands for substring search. This is for searching a constant within a field.
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 -> JCL & VSAM

 


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 Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top