Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Problems with OUTFIL/OMIT

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

New User


Joined: 08 Jan 2009
Posts: 3
Location: India

PostPosted: Thu Jan 08, 2009 9:39 pm    Post subject: Problems with OUTFIL/OMIT
Reply with quote

Hi,

I'm using the following card.

Code:
OUTFIL FILES=1                             
SORT FIELDS=(11,2,PD0,A)                   
OUTFIL FILES=2,INCLUDE=(168,2,BI,EQ,X'011C')
OUTFIL FILES=3,OMIT=(24,1,CH,EQ,C'T',OR,24,1,CH,EQ,C'O',OR,
                        24,1,CH,EQ,C'R',OR,24,1,CH,EQ,C'G')
SORT FIELDS=(168,2,PD,A,42,2,PD,A,15,9,PD,A)


My output is File3. It's required that this file gives me the o/p after omitting records from & then sorting the i/p file.

Is there a syntax problem? Please advise.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Jan 08, 2009 9:48 pm    Post subject: Re: Problems with OUTFIL/OMIT
Reply with quote

Arunav wrote:
Is there a syntax problem?
Is there a syntax problem? What does your sysout show?
Two SORT statements?
Back to top
View user's profile Send private message
Arunav

New User


Joined: 08 Jan 2009
Posts: 3
Location: India

PostPosted: Thu Jan 08, 2009 9:57 pm    Post subject: Reply to: Problems with OUTFIL/OMIT
Reply with quote

Hi,

Thanks for the swift reply!

My output from File3 shows records omitted correctly from the OMIT statement but the below SORT statement doesn't seem to get a hit.

SORT FIELDS=(168,2,PD,A,42,2,PD,A,15,9,PD,A)

Is it because the file has already been sorted for File1 & the OUTFIL for File3 is taking that as input? Can we use multiple SORTs while involving OUTFIL control statement?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Jan 08, 2009 10:08 pm    Post subject:
Reply with quote

I do believe that one is all you are allowed.....
Each type of program control statement can appear only once within a single source (for example, the SYSIN data set).
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 Jan 08, 2009 10:23 pm    Post subject:
Reply with quote

Arunav,

You can only have one SORT statement per DFSORT run. Your first SORT statement is used and your second SORT statement is ignored.

SORT is processed before OUTFIL, so your records are sorted by 11,2,PD0,A and then those sorted records are processed by your three OUTFIL statements.


Quote:
It's required that this file gives me the o/p after omitting records from & then sorting the i/p file.


If you want to omit records before sorting, then you have to use an OMIT statement, not an OMIT operand on OUTFIL. The OMIT statement is processed before the SORT statement. OUTFIL (and OUTFIL OMIT) is processed after the SORT statement. Note that an OMIT statement would affect all of the OUTFIL output files.

See this Figure which shows the order of processing of the DFSORT control statements and options:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA30/FIGSTMTSEQ?SHELF=&DT=20080528171007&CASE=&ScrollTOP=FIGSTMTSEQ#FIGSTMTSEQ

If you explain more clearly exactly what you're trying to do, I can show you how to do it. Showing examples of your input records and expected output records for the three files would help.
Back to top
View user's profile Send private message
Arunav

New User


Joined: 08 Jan 2009
Posts: 3
Location: India

PostPosted: Fri Jan 09, 2009 12:37 am    Post subject: Reply to: Problems with OUTFIL/OMIT
Reply with quote

Thanks Frank!

Since I need the same i/p file to be sorted in two different ways, I guess going for two different steps is my only option.

Actually I initially had two separate steps but since my input file has got huge data, it was throwing up performance issues. That's why I wanted to work around it using an existing sort step which has the same file as input.

Anyway I'll get back in case I have any further queries. Thank you!!
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: Fri Jan 09, 2009 12:42 am    Post subject:
Reply with quote

You actually need two passes, not two steps. You can use ICETOOL to do it in one step, but it will still require two passes over the input file.
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 BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts Problems in File-Aid / DB2 Spufi whil... amitc23 CLIST & REXX 6 Fri Feb 12, 2016 1:59 pm
No new posts Join and Omit records- Master File no... shajeeth DFSORT/ICETOOL 5 Tue Jan 26, 2016 8:16 pm
No new posts OUTREC on OUTFIL error rocky_balboa DFSORT/ICETOOL 4 Thu Aug 27, 2015 10:26 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us