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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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