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

Query on OUTFIL


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

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Tue May 06, 2008 5:43 pm
Reply with quote

Hi,

I have one doubt on DFSORT's function OUTFIL.

We have a SORT card as shown below.

Code:

  OUTFIL FILES=1,INCLUDE=(64,1,CH,EQ,C'1')
  OUTFIL FILES=2,INCLUDE=(64,1,CH,EQ,C'2')
  OUTFIL FILES=3,INCLUDE=(64,1,CH,EQ,C'3')


My understandingis, if 64th colomn of the file is 1 for a particular record, it should be written to 1 file, if 64th colomn is '2', it should be written to 2 file and so on.....

Wehave one more SORT card as shown below.

Code:

  OUTFIL FNAMES=SORT0F1,INCLUDE=(1,5,CH,GT,C'     ')
  OUTFIL FNAMES=SORT0F2,INCLUDE=(1,5,CH,GT,C'     ')
  OUTFIL FNAMES=SORT0F3,INCLUDE=(1,5,CH,GT,C'     ')


In this case, how the records would be written into the 3 files? Here conditions are same for all files.

Regards,
KSK
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: Wed May 07, 2008 8:57 pm
Reply with quote

OUTFIL statements with INCLUDE are independent of each other. Each OUTFIL data set will receive the records that meet the criteria for its associated INCLUDE condition.

So for the first set of OUTFIL statements with different mutually exclusive INCLUDE conditions, different records will be written to each data set.

For example:

Code:

  OUTFIL FNAMES=OUT1,INCLUDE=(1,1,CH,EQ,C'1')
  OUTFIL FNAMES=OUT2,INCLUDE=(1,1,CH,EQ,C'2')


OUT1 will receive the '1' records. OUT2 will receive the '2' records.

For the second set of OUTFIL statements, each of which has the same INCLUDE condition, the same records will be written to each data set.

For example:

Code:

  OUTFIL FNAMES=OUT1,INCLUDE=(1,1,CH,EQ,C'1')
  OUTFIL FNAMES=OUT2,INCLUDE=(1,1,CH,EQ,C'1')
  OUTFIL FNAMES=OUT3,INCLUDE=(1,1,CH,EQ,C'2')
  OUTFIL FNAMES=OUT4,INCLUDE=(1,1,CH,EQ,C'2')


OUT1 will receive the '1' records. OUT2 will receive the '1' records. OUT3 will receive the '2' records. OUT4 will receive the '2' records.

If you use SAVE instead of INCLUDE for an OUTFIL statement, then that OUTFIL data set would receive the records (if any) that did not meet the criteria for any of the other OUTFIL statements.

For example:

Code:

  OUTFIL FNAMES=OUT1,INCLUDE=(1,1,CH,EQ,C'1')
  OUTFIL FNAMES=OUT2,INCLUDE=(1,1,CH,EQ,C'2')
  OUTFIL FNAMES=OUT3,SAVE


OUT1 will receive the '1' records. OUT2 will receive the '2' records. OUT3 will receive the other records (not '1' or '2').
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu May 08, 2008 4:15 am
Reply with quote

Hi,
I'm not sure what's happening with some of these threads, but many of the replies are been deleted.

I don't see much difference to Frank's reply to what had been suggested by others.

Are DFSORT questions only for Frank to answer ?

There are many smart users out there (i'm not one of them) using this tool and I'm sure they can also contribute with hands on experience with some of the issues raised.

Personally I'd rather the mistakes be pointed out rather than just erasing them.

Are we supposed to take copies of what we enter in this Forum so we remember what we quoted ?



Gerry
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: Thu May 08, 2008 4:37 am
Reply with quote

I deleted the responses and replaced them with one comprehensive response. I don't think it helps the OP to have a long, rambling set of responses when one coherent response will do.

Quote:
Personally I'd rather the mistakes be pointed out rather than just erasing them.


In a perfect world, I would do that, but I just don't have the time to do that and also do my development work on DFSORT. I feel it's more important to add functions to DFSORT that everyone can use (like PARSE, JFY, SQZ, IFTHEN, OVERLAY, ICETOOL, etc, etc, etc and the new functions I'm working on) then to point out peoples' errors. I'm sorry if that bothers you, but I have to prioritize.

Quote:
Are DFSORT questions only for Frank to answer ?


I would prefer that people let the two DFSORT developers on this board (myself and Kolusu) answer the questions in the DFSORT Forum, as it would save me time and result in better answers in most cases, but I can't stop anyone from posting. All I can do is "clean things up".

Quote:
There are many smart users out there (i'm not one of them) using this tool and I'm sure they can also contribute with hands on experience with some of the issues raised.


Yes, and when they do, I generally don't delete the posts (unless I think deleting them or replacing them will result in a better thread).
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Thu May 08, 2008 9:29 am
Reply with quote

Thanks Frank for your detailed explanation.

Regarding threads, you are absolutely right because message I have read from yours is some what different than others and even some answers were wrong.

Good and detailed single answer is enough rather than more confused answers.

Once again thanks for your nice explanation.

Regards,
KSK
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu May 08, 2008 9:59 am
Reply with quote

KSK,

I have never heard so much grovelling as yours, people were trying to assist even though you were too lazy to run your own test and could have easily answered your own question.

One thing that I always do is test things before I ask the question.

If remember correctly your code even had syntax errors but that was just ignored.



Gerry
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Thu May 08, 2008 10:48 am
Reply with quote

Gerry,

My intention not to show other people's mistakes. But I always try to give right answer if I know otherwise I never answer to any post.

I have tested with my own prepared data and I had some on doubts on that (We didn't have test data to do and I had to send analysis report on this). So, posted for exact answer and to verify my answers.

As I was working on client's network, I couldn't make copy and paste the code into local network. Due to typo misatkes, I might have given space before INCLUDE. Look in a broad manner not with a narrow mind.

Don't think others are lazy and you are very sharp and good. Sometimes due to some situations, we can't do testing e.g., in this case, we didn't have test data but we had to send analysis report on some SORT cards.

KSK
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 Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts RC query -Time column CA Products 3
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top