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
 

 

Quotation Convertion in Sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Mon Jun 28, 2010 1:24 am    Post subject: Quotation Convertion in Sort
Reply with quote

Hi,

Can anyone help me in converting the Single Quotation to Space in Sort

I tried using below Sort card but couldn't succed

Code:
//SYSIN    DD  *                                               
    SORT FIELDS=(5,20,CH,A)                                     
    OUTREC  IFTHEN=(WHEN=(10,1,CH,EQ,C"'"),OVERLAY=(10:C" ")), 
            IFTHEN=(WHEN=(11,1,CH,EQ,C"'"),OVERLAY=(11:C" ")), 
            IFTHEN=(WHEN=(12,1,CH,EQ,C"'"),OVERLAY=(12:C" "))   


Getting a Syntax error message as

Code:
SYNCSORT LICENSED             
SYSIN :                                                                   
    SORT FIELDS=(5,20,CH,A)                                               
    OUTREC  IFTHEN=(WHEN=(10,1,CH,EQ,C"'"),OVERLAY=(10:C" ")),           
                                                                       * 
            IFTHEN=(WHEN=(11,1,CH,EQ,C"'"),OVERLAY=(11:C" ")),           
            *                                                             
            IFTHEN=(WHEN=(12,1,CH,EQ,C"'"),OVERLAY=(12:C" "))             
WER268A  OUTREC STATEMENT  : SYNTAX ERROR                                 
WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT                           
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                             
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                           


Some one help me whether we can convert the Single Quotation in Sort card.

Thanks
Ashwin
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Jun 28, 2010 2:09 am    Post subject: Re: Quotation Convertion in Sort
Reply with quote

ashwinreddy wrote:
Code:
SYNCSORT LICENSED             
SYSIN :                                                                   
    SORT FIELDS=(5,20,CH,A)                                               
    OUTREC  IFTHEN=(WHEN=(10,1,CH,EQ,C"'"),OVERLAY=(10:C" ")),           
                                                                       * 
            IFTHEN=(WHEN=(11,1,CH,EQ,C"'"),OVERLAY=(11:C" ")),           
            *                                                             
            IFTHEN=(WHEN=(12,1,CH,EQ,C"'"),OVERLAY=(12:C" "))             
WER268A  OUTREC STATEMENT  : SYNTAX ERROR                                 
WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT                           
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                             
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                           


Some one help me whether we can convert the Single Quotation in Sort card.
With your attempt to align the '*'s, I can't tell what is wrong except the error seems to be complaining about "NO KEYWORDS" rather than some problem with the quotes....

Please re-post the error sysout and DO NOT attempt to adjust it, just wrap the "code" around it.
At the same time, please include the version/release information in that sysout.
Back to top
View user's profile Send private message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Mon Jun 28, 2010 3:47 am    Post subject: Reply to: Quotation Convertion in Sort
Reply with quote

Below is the Full Jcl

Code:


//STEP2  EXEC  PGM=SYNCSORT                                     
//SYSOUT   DD  SYSOUT=*                                         
//SORTIN   DD  DISP=SHR,DSN=CLST.TEST.SCL.INFO.D062510.FNL.V01   
//SORTOUT  DD  DSN=CLST.TEST.SCL.INFO.D062510.FNL.V02,           
//             UNIT=SYSDA,DISP=(NEW,CATLG,DELETE),DATACLAS=MB010,
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)                 
//SYSIN    DD  *                                                 
    SORT FIELDS=(5,20,CH,A)                                     
    OUTREC  IFTHEN=(WHEN=(10,1,CH,EQ,C"'"),OVERLAY=(10:C" ")),   
            IFTHEN=(WHEN=(11,1,CH,EQ,C"'"),OVERLAY=(11:C" ")),   
            IFTHEN=(WHEN=(12,1,CH,EQ,C"'"),OVERLAY=(12:C" "))   
/*                                                               



And Spool

Code:


 SYNCSORT FOR Z/OS  1.3.2.0R    U.S. PATENTS: 4210961, 5117495   (C) 2007 SY
                                                       z/OS   1.10.0       
  SYSIN :                                                                   
     SORT FIELDS=(5,20,CH,A)                                               
     OUTREC  IFTHEN=(WHEN=(10,1,CH,EQ,C"'"),OVERLAY=(10:C" ")),             
                                                                        *   
             IFTHEN=(WHEN=(11,1,CH,EQ,C"'"),OVERLAY=(11:C" ")),             
             *                                                             
             IFTHEN=(WHEN=(12,1,CH,EQ,C"'"),OVERLAY=(12:C" "))             
 WER268A  OUTREC STATEMENT  : SYNTAX ERROR                                 
 WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT                           
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                             
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE



I used same sort card sometime back to convert a character, but not sure whether we can convert a Quotation. And * indicates some error in the syntax and confused as am sure this syntax is good (as used earlier).

Please correct me if am wrong.

Thanks
Ashwin
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon Jun 28, 2010 5:05 am    Post subject:
Reply with quote

Hi,

try this
Code:
    SORT FIELDS=(5,20,CH,A)                                     
    OUTREC  IFTHEN=(WHEN=(10,1,CH,EQ,C''''),OVERLAY=(10:C' ')), 
            IFTHEN=(WHEN=(11,1,CH,EQ,C''''),OVERLAY=(11:C' ')), 
            IFTHEN=(WHEN=(12,1,CH,EQ,C''''),OVERLAY=(12:C' '))   



Gerry
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Jun 28, 2010 5:23 am    Post subject:
Reply with quote

Yes, I'm kinda thinking that way, since
SyncSort for z/OS 1.2 Programmer’s Guide wrote:
An apostrophe within a literal string must be specified with a double apostrophe (e.g., C'O''LEARY').
I am having problems finding my 1.3.2 manual and the equivalent definition of DFSort's reference to PAIR=APOST vs PAIR=QUOTE....
Back to top
View user's profile Send private message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Mon Jun 28, 2010 5:59 am    Post subject: Reply to: Quotation Convertion in Sort
Reply with quote

Thanks all.

It worked.

Thanks
Ashwin
Back to top
View user's profile Send private message
keyarika

New User


Joined: 24 May 2008
Posts: 10
Location: bangalore

PostPosted: Mon Jun 28, 2010 12:35 pm    Post subject:
Reply with quote

Hi,

In case, the 'Single Quote' is present in all three position (10, 11 & 12) in single record and you want to change all of them then use HIT=NEXT

Code:
OUTREC  IFTHEN=(WHEN=(10,1,CH,EQ,C''''),OVERLAY=(10:C' ')),HIT=NEXT, 
        IFTHEN=(WHEN=(11,1,CH,EQ,C''''),OVERLAY=(11:C' ')),HIT=NEXT, 
        IFTHEN=(WHEN=(12,1,CH,EQ,C''''),OVERLAY=(12:C' '))
Code'd
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 Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm
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 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


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