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
 
FINDREP on specific location

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

New User


Joined: 08 Mar 2007
Posts: 23
Location: CHENNAI

PostPosted: Fri Aug 21, 2009 3:52 am    Post subject: FINDREP on specific location
Reply with quote

I have following Control Card which replaces based on the condition

Code:

  OPTION COPY                           
  INREC IFTHEN=(WHEN=(23,1,CH,NE,C'1'),
     FINDREP=(IN=X'00',OUT=X'40'))         


But what change i need to do if i want to change specific bytes only..

Suppose if 23 Byte is not C'1' i want to change all NULLS from Pos-30 to Pos-40 to Blanks.

How can i specify location while using FINDREP ?
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Aug 21, 2009 5:33 am    Post subject:
Reply with quote

Hi,


see link http://ibmmainframes.com/viewtopic.php?t=43055&highlight=startpos+endpos


Gerry
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 Aug 21, 2009 9:10 pm    Post subject:
Reply with quote

Manoj,

You can use these DFSORT control statements:

Code:

  OPTION COPY                                             
  INREC IFTHEN=(WHEN=(23,1,CH,NE,C'1'),                   
    FINDREP=(IN=X'00',OUT=X'40',STARTPOS=30,ENDPOS=40))   


For complete details on DFSORT's FINDREP function, see:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000085
Back to top
View user's profile Send private message
manoz_k

New User


Joined: 08 Mar 2007
Posts: 23
Location: CHENNAI

PostPosted: Fri Aug 21, 2009 11:40 pm    Post subject:
Reply with quote

Frank Yaeger wrote:
Manoj,

You can use these DFSORT control statements:

Code:

  OPTION COPY                                             
  INREC IFTHEN=(WHEN=(23,1,CH,NE,C'1'),                   
    FINDREP=(IN=X'00',OUT=X'40',STARTPOS=30,ENDPOS=40))   


For complete details on DFSORT's FINDREP function, see:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000085


Frank,

I have two conditions here
1) WHEN=(23,1,CH,NE,C'1')
2) WHEN=(23,1,CH,EQ,C'1')

and based on that i have two different actions respectively

FINDREP=(IN=X'00',OUT=X'40',STARTPOS=30,ENDPOS=40))
FINDREP=(IN=X'00',OUT=X'40',STARTPOS=819,ENDPOS=860))

I want something like
Code:

OPTION COPY                                             
  INREC IFTHEN=(WHEN=(23,1,CH,EQ,C'1'),                 
  FINDREP=(IN=X'00',OUT=X'40',STARTPOS=37,ENDPOS=900))   
  INREC IFTHEN=(WHEN=(23,1,CH,NE,C'1'),                 
  FINDREP=(IN=X'00',OUT=X'40',STARTPOS=819,ENDPOS=834)) 



But i could not mimic two FINDREPs together with two WHEN conditions.
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: Sat Aug 22, 2009 1:16 am    Post subject:
Reply with quote

You need to use one INREC with two IFTHEN clauses, not two INRECs. You need to use HIT=NEXT for the first IFTHEN clause. Here are the DFSORT statements:

Code:

  OPTION COPY                                                       
  INREC IFTHEN=(WHEN=(23,1,CH,EQ,C'1'),                             
     FINDREP=(IN=X'00',OUT=X'40',STARTPOS=37,ENDPOS=900),           
     HIT=NEXT),                                                     
  IFTHEN=(WHEN=(23,1,CH,NE,C'1'),                                   
    FINDREP=(IN=X'00',OUT=X'40',STARTPOS=819,ENDPOS=834))           


Note that you could use WHEN=NONE for the second IFTHEN clause.
Back to top
View user's profile Send private message
manoz_k

New User


Joined: 08 Mar 2007
Posts: 23
Location: CHENNAI

PostPosted: Sat Aug 22, 2009 3:36 am    Post subject:
Reply with quote

Thank you very much Frank. It worked well.I corrected my mistake of using INREC twice.
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 How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts copying data without knowing location Arun Raj DFSORT/ICETOOL 12 Thu Jul 20, 2017 1:03 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts Route a product's job to specific lpar vasanthz All Other Mainframe Topics 9 Thu Mar 02, 2017 2:22 am

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