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
 

 

syntax error when using FINDREP option

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
raj12vel

New User


Joined: 20 Dec 2008
Posts: 43
Location: New Jersey

PostPosted: Fri Feb 26, 2010 8:09 pm    Post subject: syntax error when using FINDREP option
Reply with quote

Hi All,

Input file has LRECL of 600 Fixed Bytes.

There are some numeric fields presents in the input file with two decimals.

For Ex:
36,744.00
Comma and decimal point needs to be removed from these values.So I have used FINDREP option to perform this.
Code:

//SYSIN    DD *                                                       
     OPTION COPY                                                     
     INREC FINDREP=(INOUT=(C',',C'',C'.',C''),STARTPOS=117,ENDPOS=150)
//*                                                                   


It worked fine. Now I want to use the same concept for all the numeric fields which are at different positions. Below code ended with syntax
error.
Code:

//SYSIN    DD *                                                       
   OPTION COPY                                                         
   INREC FINDREP=((INOUT=(C',',C'',C'.',C''),STARTPOS=117,ENDPOS=150),
                 (INOUT=(C',',C'',C'.',C''),STARTPOS=193,ENDPOS=198)) 
//*                                                                   


Can any one help me out from this issue?
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Feb 26, 2010 9:58 pm    Post subject:
Reply with quote

You have to use IFTHEN clauses for that. Here's the correct DFSORT syntax:

Code:

  OPTION COPY                                                     
  INREC IFTHEN=(WHEN=INIT,                                         
     FINDREP=(INOUT=(C',',C'',C'.',C''),STARTPOS=117,ENDPOS=150), 
       HIT=NEXT),                                                 
    IFTHEN=(WHEN=INIT,                                             
     FINDREP=(INOUT=(C',',C'',C'.',C''),STARTPOS=193,ENDPOS=198)) 
Back to top
View user's profile Send private message
raj12vel

New User


Joined: 20 Dec 2008
Posts: 43
Location: New Jersey

PostPosted: Mon Mar 01, 2010 6:23 pm    Post subject:
Reply with quote

It worked fine. icon_smile.gif

Thanks alot Frank. Its always great to learn new things from you!!!

I have used the same technique in different places where i have been struck with multiple conditions.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm


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