MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HIT=NEXT in OUTFIL statement.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
oneofspace
Beginner


Joined: 18 Nov 2008
Posts: 33
Topics: 14

PostPosted: Thu May 27, 2010 10:22 am    Post subject: HIT=NEXT in OUTFIL statement. Reply with quote

Hi

Is it possible to use HIT=NEXT as below.

Code:
SORT FIELDS=COPY                                 
OUTFIL IFTHEN=(WHEN=(1,1,CH,EQ,C'*'),             
               BUILD=(1:1,120,/,1:C'A'),HIT=NEXT),
       IFTHEN=(WHEN=(1,5,CH,EQ,C'     '),         
               BUILD=(1:C'RECORD2',/,             
                      1:C'-------',/,             
                      1:1,120))                   



Thanks in advance!!
One.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu May 27, 2010 10:54 am    Post subject: Reply with quote

oneofspace,

I just don't see the need for a HIT=NEXT as your IFTHEN conditions are mutually exclusive. You can try these control cards

Code:

  SORT FIELDS=COPY                                               
  OUTFIL IFTHEN=(WHEN=(1,1,CH,EQ,C'*'),BUILD=(1:1,120,/,1:C'A')),
         IFTHEN=(WHEN=(1,5,CH,EQ,C' '),                         
          BUILD=(1:C'RECORD2',/,                                 
                 1:C'-------',/,                                 
                 1:1,120))                                       

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
oneofspace
Beginner


Joined: 18 Nov 2008
Posts: 33
Topics: 14

PostPosted: Thu May 27, 2010 11:51 am    Post subject: Reply with quote

Kolusu,

Really I do not have that sort card. Just wanted to know whether Hit=Next can be used in a IFTHEN condition when we build the output for making two or more records like below.

Code:
OUTFIL IFTHEN=(WHEN=(1,1,CH,EQ,C'*'),             
               BUILD=(1:1,120,/,1:C'A'),HIT=NEXT)


Thanks!
One.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu May 27, 2010 12:30 pm    Post subject: Reply with quote

HIT=NEXT is ignored when you have BUILD with / in the IFTHEN clause.

This is documented in the DFSORT books where it says:

Processing of IFTHEN clauses continues unless one of the following occurs:
o A WHEN=(logexp) or WHEN=ANY clause is satisfied, and HIT=NEXT is not specified.
o A WHEN=(logexp), WHEN=ANY or WHEN=NONE clause is satisfied, and BUILD with / is specified (multiple output records).
...
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
oneofspace
Beginner


Joined: 18 Nov 2008
Posts: 33
Topics: 14

PostPosted: Thu May 27, 2010 1:00 pm    Post subject: Reply with quote

Thanks Frank!

One.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group