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
 
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am

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