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
 

 

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: 2284
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: 2284
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 Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts INREC PARSING and dictionary items migusd SYNCSORT 6 Fri Jun 02, 2017 8:02 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm


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