Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us