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
 
Problem in using multiple IFTHEN statements with INREC

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

New User


Joined: 11 Aug 2005
Posts: 85
Location: England

PostPosted: Mon Nov 10, 2008 7:05 pm    Post subject: Problem in using multiple IFTHEN statements with INREC
Reply with quote

Hi All

I tried to use the below sort card for removing upto 5 leading spaces in the field starting at 47 posotion and of length = 19 bytes.

Code:

// ' INREC  IFTHEN=(WHEN=(47,5,CH,EQ,C''     ''),           ',
// '      OVERLAY=(47:52,14,61:C''     ''))                 ',
// '        IFTHEN=(WHEN=(47,4,CH,EQ,C''    ''),            ',
// '      OVERLAY=(47:51,15,62:C''    '')),                 ',
// '        IFTHEN=(WHEN=(47,3,CH,EQ,C''   ''),             ',
// '      OVERLAY=(47:50,16,63:C''   '')),                  ',
// '        IFTHEN=(WHEN=(47,2,CH,EQ,C''  ''),              ',
// '      OVERLAY=(47:49,17,64:C''  '')),                   ',
// '       IFTHEN=(WHEN=(47,1,CH,EQ,C'' ''),                ',
// '      OVERLAY=(47:48,18,65:C'' '')),                    ',


But i'm gettin the below error:


Code:


 INREC  IFTHEN=(WHEN=(47,5,CH,EQ,C'     '),     
      OVERLAY=(47:52,14,61:C'     '))           
        IFTHEN=(WHEN=(47,4,CH,EQ,C'    '),       
        *                                       
      OVERLAY=(47:51,15,62:C'    ')),           
      *                                         
        IFTHEN=(WHEN=(47,3,CH,EQ,C'   '),       
        *                                       
      OVERLAY=(47:50,16,63:C'   ')),             
      *                                         
        IFTHEN=(WHEN=(47,2,CH,EQ,C'  '),         
        *                                 
      OVERLAY=(47:49,17,64:C'  ')),       
      *                                   
       IFTHEN=(WHEN=(47,1,CH,EQ,C' '),   
       *                                 
      OVERLAY=(47:48,18,65:C' ')),       
      *                                   

WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT   


Can anybody help on this ?
Is there an alternative way of doing this using SYNCSORT. Please advice
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Mon Nov 10, 2008 10:11 pm    Post subject:
Reply with quote

leo_sangha,

If you have the latest version of Syncsort ( Release 1.3 ), I think you can do that by making use of the SQZ parameter.

If you dont have the latest version, you can follow with the current approach. But I see the "," missing before the second IFTHEN.
Quote:
OVERLAY=(47:52,14,61:C' ')),

Also you need a SORT FIELDS=(x,y,z....) or an OPTION COPY statement.
Back to top
View user's profile Send private message
leo_sangha

New User


Joined: 11 Aug 2005
Posts: 85
Location: England

PostPosted: Tue Nov 11, 2008 3:48 pm    Post subject: Reply to: Problem in using multiple IFTHEN statements with I
Reply with quote

arcvns, thanks.

I would like to know more about SQZ. I think our shop has SYNCSORT FOR Z/OS 1.2.2.3R installed. Is the one you pointed out ?

It was missing comma. Below sort card is working fine now.

Code:

// ' INREC  IFTHEN=(WHEN=(47,5,CH,EQ,C''     ''),           ',
// '      OVERLAY=(47:52,14,61:C''     '')),                 ',
// '        IFTHEN=(WHEN=(47,4,CH,EQ,C''    ''),            ',
// '      OVERLAY=(47:51,15,62:C''    '')),                 ',
// '        IFTHEN=(WHEN=(47,3,CH,EQ,C''   ''),             ',
// '      OVERLAY=(47:50,16,63:C''   '')),                  ',
// '        IFTHEN=(WHEN=(47,2,CH,EQ,C''  ''),              ',
// '      OVERLAY=(47:49,17,64:C''  '')),                   ',
// '       IFTHEN=(WHEN=(47,1,CH,EQ,C'' ''),                ',
// '      OVERLAY=(47:48,18,65:C'' ''))                    ',
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Tue Nov 11, 2008 6:10 pm    Post subject:
Reply with quote

leo_sangha,
Quote:

It was missing comma. Below sort card is working fine now.

Good to hear it's working now icon_smile.gif

Quote:
I would like to know more about SQZ. I think our shop has SYNCSORT FOR Z/OS 1.2.2.3R installed. Is the one you pointed out ?

Nope, The latest release is Syncsort for z/OS Release 1.3. Here's some brief description of the parameter.
Syncsort for z/OS Release 1.3 manual wrote:
The SQZ Subparameter
The SQZ subparameter specifies the following basic operations:
• All blank characters in the input field are eliminated.
• If left-shifting is specified, the remaining characters are shifted left; any necessary blanks are introduced on the right.
• If right-shifting is specified, the remaining characters are shifted right; any necessary blanks are introduced on the left.
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 LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI %IF statements Pedro PL/I & Assembler 1 Tue Sep 19, 2017 12:06 am
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

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