Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sort for string having quote in it

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Sort for string having quote in it
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: 1439
Location: Bangalore,India

PostPosted: Fri Nov 23, 2007 11:45 am    Post subject:
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    Post subject:
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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Fri Nov 23, 2007 12:00 pm    Post subject: Reply to: Sort for string having quote in it
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us