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 

include fields not working.

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


Joined: 12 Mar 2004
Posts: 15
Topics: 6

PostPosted: Mon Apr 05, 2004 3:56 am    Post subject: include fields not working. Reply with quote

hi all,
i was experimenting with various control statements in sort.Then i came across this scenario. i cannot understand it. please see if someone can help me.

job
----
Code:

//STEP040  EXEC PGM=SORT
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=VND709.SAMPLE.INPUT,
//             DISP=SHR
//SORTOUT  DD  DISP=(NEW,CATLG,DELETE),
//             DSN=VND709.OUTPUT.TEST,
//             UNIT=SYSDA,
//             SPACE=(TRK,(5,5),RLSE),
//             DCB=(BLKSIZE=0,LRECL=0,RECFM=FB)
//SYSIN    DD  *
  INREC FIELDS=(1,18,C'1')
  SORT FIELDS=(1,10,ZD,A)
  SUM  FIELDS=(19,1,ZD)
  INCLUDE COND=(19,1,CH,EQ,C'1')
  OUTREC FIELDS=(1:1,19)
/*

input file
----------

1111111111AABBCCDD
3333333333AABBCCDD
2222222222AACCDDEE
5555555555LLLLLLLL
5555555555OOOOOOOO
5555555555AACCDDEE
4444444444AACCDDEE
9999999999AABBCCDD
9999999999AABBCCDD
7777777777AABBCCDD
6666666666AAEECCDD
8888888888IIIIIIII
1111111111AAFFCCDD
1111111111AAFFCCDD

output file
-----------
BLANK. no records are selected.

i took out the include condition and ran the job again.

i got the output as

1111111111AABBCCDD3
2222222222AACCDDEE1
3333333333AABBCCDD1
4444444444AACCDDEE1

5555555555LLLLLLLL3
6666666666AAEECCDD1
7777777777AABBCCDD1

8888888888IIIIIIII1
9999999999AABBCCDD2

so if i have the include condition in my sort step, then the highlighted records should be selected. But it is not being selected. can anyone explain why it is so?

thanks
doubt_man.
Back to top
View user's profile Send private message Yahoo Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Mon Apr 05, 2004 10:04 am    Post subject: Reply with quote

The INCLUDE statement (INCLUDE COND=) is processed BEFORE all of the other statements. If you want to do an INCLUDE AFTER the records are processed, you can use the INCLUDE parameter of the OUTFIL statement (INCLUDE=).

Here's a diagram that shows the order in which various DFSORT control statements are processed:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA00/FIGSTMTSEQ?SHELF=&DT=20031124143823&CASE=&ScrollTOP=FIGSTMTSEQ#FIGSTMTSEQ
_________________
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
doubt_man
Beginner


Joined: 12 Mar 2004
Posts: 15
Topics: 6

PostPosted: Tue Apr 06, 2004 4:15 am    Post subject: Reply with quote

Hi Frank,
As you said , include was first processed, thats why i got the output file as blank. i changed include to outfil include. i got the correct output. thank you very much.
thanks
doubt_man
Back to top
View user's profile Send private message Yahoo Messenger
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