Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
vivekss97

New User

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

 Posted: Fri Jul 24, 2009 12:16 pm    Post subject: Reply to: DFsort convert from hex/bin to character What is purpose of Hit=NExt in IFthen

dick scherrer

Site Director

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

 Posted: Fri Jul 24, 2009 7:15 pm    Post subject: 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: http://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.
Frank Yaeger

DFSORT Moderator

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

Posted: Fri Jul 24, 2009 9:23 pm    Post subject:

 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.
vivekss97

New User

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

 Posted: Sat Jul 25, 2009 2:09 pm    Post subject: Reply to: What is the purpose of hit=next? Thanks Franks .
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Tool to access DB2 Zos - For Query pu... gylbharat DB2 6 Thu Oct 04, 2012 6:17 pm What is the purpose of LIBDEF keyword? enrico-sorichetti TSO/ISPF 1 Tue Oct 18, 2011 11:22 am Purpose of SCL in endeavor kumar32149 CA Products 5 Sat Nov 13, 2010 11:28 am Purpose of INSENSITIVE SCROLL CURSOR ... GaganGarg DB2 3 Mon Jun 21, 2010 8:00 pm How to use cond for this purpose? MALLIKARJUN.KUMMITHA JCL & VSAM 5 Thu Feb 18, 2010 12:56 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us