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

OUTFIL with multiple output files with count only


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

New User


Joined: 10 Jul 2014
Posts: 3
Location: USA

PostPosted: Thu Nov 06, 2014 7:08 pm
Reply with quote

HI,

Needed help with the following problem. I am trying to write the counts (only) of records which satisfies certain conditions in to 3 different files. the following is the SORT card I am using.

Code:
SYSIN :                                                     
  SORT FIELDS=COPY                                           
  OUTFIL FILES=01,                                           
       INCLUDE=(52,2,CH,EQ,C'LS',AND,(138,3,CH,EQ,C'ACT',OR,
              138,4,CH,EQ,C'TACT'),AND,                     
              1109,20,CH,EQ,C'OAK ISLAND'),NODETAIL,         
      TRAILER1=(COUNT=(M10,LENGTH=10))                       
  OUTFIL FILES=02,                                           
      INCLUDE=(52,2,CH,EQ,C'LS',AND,(138,3,CH,EQ,C'ACT',OR, 
              138,4,CH,EQ,C'TACT'),NODETAIL,                 
      TRAILER1=(COUNT=(M10,LENGTH=10))                       
                                      *                     
  OUTFIL FILES=03,                                           
      INCLUDE=(138,3,CH,EQ,C'ACT',OR,                       
              138,4,CH,EQ,C'TACT'),NODETAIL,                 
      TRAILER1=(COUNT=(M10,LENGTH=10))                       
WER268A  OUTFIL STATEMENT  : SYNTAX ERROR                   
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE               


Can you tell me the correct syntax?

Thanks
George

Code'd
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Nov 06, 2014 7:51 pm
Reply with quote

The INCLUDE in 2nd OUTFIL is missing a parenthesis.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Nov 06, 2014 8:43 pm
Reply with quote

Also looks to me as though your can improve clarity and performance by INCLUDE COND=(... for ACT and TACT. You can then remove all of those from your OUTFIL INCLUDE=s, which will simplify, and you won't process any non-ACT/TACT records at all, rather than processing to just ignore them.
Back to top
View user's profile Send private message
garunmj

New User


Joined: 10 Jul 2014
Posts: 3
Location: USA

PostPosted: Thu Nov 06, 2014 10:40 pm
Reply with quote

I feel so silly. It worked. Thank you!!
Back to top
View user's profile Send private message
garunmj

New User


Joined: 10 Jul 2014
Posts: 3
Location: USA

PostPosted: Thu Nov 06, 2014 10:43 pm
Reply with quote

Thank you Bill. That makes sense.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top