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 SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm

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