IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What is the purpose of hit=next?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vivekss97

New User


Joined: 15 Feb 2009
Posts: 3
Location: Chennai, India

PostPosted: Fri Jul 24, 2009 12:16 pm
Reply with quote

What is purpose of Hit=NExt in IFthen
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jul 24, 2009 7:15 pm
Reply with quote

Hello and welcome to the forum,

When you have a question you need to start a new topic for your question rather than posting a reply to some topic that has been inactive for years.

You also should look in the manual first. . . Here is a topic that contains links to DFSORT info:
ibmmainframes.com/viewtopic.php?t=1348

If there is something in the manual that is not clear, post that here and your doubt about it.

Someone will clarify.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri Jul 24, 2009 9:23 pm
Reply with quote

Quote:
What is purpose of Hit=NExt in IFthen


It's easier to explain with an example:

Code:

  INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'1'),OVERLAY=(21:C'A')),
      IFTHEN=(WHEN=(5,1,CH,EQ,C'1'),OVERLAY=(25:C'B'))


The above does NOT have HIT=NEXT, so when position 1 has '1', we put 'A' in position 21 and stop processing that record. We will not check if position 5 has '1' so we can only get 'A' or 'B', but not both.

Code:

  INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'1'),OVERLAY=(21:C'A'),
         HIT=NEXT),
      IFTHEN=(WHEN=(5,1,CH,EQ,C'1'),OVERLAY=(25:C'B'))


The above does have HIT=NEXT, so when position 1 has '1', we put 'A' in position 21 and then we check if position 5 has '1' and put a 'B' in position 25. Thus, with HIT=NEXT, we can get 'A' and 'B'.

HIT=NEXT is useful when the conditions of different clauses can be satisfied independently. It tells DFSORT to continue with the next clause even if the current clause is satisfied.
Back to top
View user's profile Send private message
vivekss97

New User


Joined: 15 Feb 2009
Posts: 3
Location: Chennai, India

PostPosted: Sat Jul 25, 2009 2:09 pm
Reply with quote

Thanks Franks icon_razz.gif.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts What is the purpose of z/OS dataset e... All Other Mainframe Topics 3
No new posts Tool to access DB2 Zos - For Query pu... DB2 6
No new posts What is the purpose of LIBDEF keyword? TSO/ISPF 1
No new posts Purpose of SCL in endeavor CA Products 5
No new posts Purpose of INSENSITIVE SCROLL CURSOR ... DB2 3
Search our Forums:

Back to Top