Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Query on OUTFIL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ksk

Active User


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

PostPosted: Tue May 06, 2008 5:43 pm    Post subject: Query on OUTFIL
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 Moderator


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

PostPosted: Wed May 07, 2008 8:57 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Thu May 08, 2008 4:15 am    Post subject:
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 Moderator


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

PostPosted: Thu May 08, 2008 4:37 am    Post subject:
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: 356
Location: New York

PostPosted: Thu May 08, 2008 9:29 am    Post subject:
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: 1703
Location: Australia

PostPosted: Thu May 08, 2008 9:59 am    Post subject:
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: 356
Location: New York

PostPosted: Thu May 08, 2008 10:48 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts GETMAIN/FREEMAIN query Suja.Sai CICS 9 Tue Jan 31, 2017 12:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us