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

Combine 2 OUTFIL's with different INCLUDE's in 1 sort step


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

New User


Joined: 06 Sep 2007
Posts: 2
Location: Toronto

PostPosted: Tue Sep 23, 2008 10:05 pm
Reply with quote

Hi
I have spent some time trying to combine the following into one SORT step. It runs fine in 2 steps but I am getting syntax errors, sort errors, INCONSISTENT SORTOUT1 IFTHEN 0 REFORMATTING FIELD FOUND etc.
I must be missing something stupid can someone help?
Thanks.

1st sort:
Code:
   SORT    FIELDS=(40,4,BI,A)
   OPTION  VLSCMP
   INCLUDE COND=(11,06,CH,EQ,C'CARCAR',
                 AND,229,05,PD,EQ,0)
   OUTFIL FNAMES=SORTOUT,VTOF,
          OUTREC=(1:40,4,BI,M11,LENGTH=9,
                  C',',40,2,BI,M11,LENGTH=4,
                  C',',51,5,PD,M11,LENGTH=8,
                  C',',72,2,
                  C',',74,5,PD,M11,LENGTH=8,
                  C',',88,1,
                  C',',89,5,PD,M11,LENGTH=8,
                  C',',229,5,PD,M11,LENGTH=8,
                  C',',234,5,PD,M11,LENGTH=8,16C' ')


2nd sort:
Code:
   SORT    FIELDS=(40,4,BI,A)
   OPTION  VLSCMP
   INCLUDE COND=(11,06,CH,EQ,C'CARCAR',
                 AND,229,05,PD,NE,0)
   OUTFIL FNAMES=SORTOUT,VTOF,
          OUTREC=(1:40,4,BI,M11,LENGTH=9,
                  C',',40,2,BI,M11,LENGTH=4,
                  C',',51,5,PD,M11,LENGTH=8,
                  C',',72,2,
                  C',',74,5,PD,M11,LENGTH=8,
                  C',',88,1,
                  C',',89,5,PD,M11,LENGTH=8,
                  C',',229,5,PD,M11,LENGTH=8,
                  C',',234,5,PD,M11,LENGTH=8,16C' ')


The sorts are basically the same except for one operand EQ vs. NE
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Sep 23, 2008 10:26 pm
Reply with quote

JIM MACPHAIL,

Try the following control cards

Code:

//STEP0100 EXEC PGM=ICEMAN   
//SYSOUT   DD SYSOUT=*       
//SORTIN   DD dsn=your input vb file,disp=shr
//OUT1     DD DSN=YOUR OUTPUT FILE1,DISP=(NEW,CATLG,DELETE)
//OUT2     DD DSN=YOUR OUTPUT FILE2,DISP=(NEW,CATLG,DELETE)
//SYSIN    DD *   
  OPTION  VLSCMP
  SORT FIELDS=(40,4,BI,A)
  INCLUDE COND=(11,06,CH,EQ,C'CARCAR')
 
  OUTFIL FNAMES=OUT1,VTOF,
  INCLUDE=(229,05,PD,EQ,0),
  OUTREC=(1:40,4,BI,M11,LENGTH=9,
          C',',40,2,BI,M11,LENGTH=4,
          C',',51,5,PD,M11,LENGTH=8,
          C',',72,2,
          C',',74,5,PD,M11,LENGTH=8,
          C',',88,1,
          C',',89,5,PD,M11,LENGTH=8,
          C',',229,5,PD,M11,LENGTH=8,
          C',',234,5,PD,M11,LENGTH=8,16C' ')

  OUTFIL FNAMES=OUT2,VTOF,
  INCLUDE=(229,05,PD,NE,0),
  OUTREC=(1:40,4,BI,M11,LENGTH=9,
          C',',40,2,BI,M11,LENGTH=4,
          C',',51,5,PD,M11,LENGTH=8,
          C',',72,2,
          C',',74,5,PD,M11,LENGTH=8,
          C',',88,1,
          C',',89,5,PD,M11,LENGTH=8,
          C',',229,5,PD,M11,LENGTH=8,
          C',',234,5,PD,M11,LENGTH=8,16C' ')
             
/*
Back to top
View user's profile Send private message
JIM MACPHAIL

New User


Joined: 06 Sep 2007
Posts: 2
Location: Toronto

PostPosted: Tue Sep 23, 2008 10:57 pm
Reply with quote

Thanks Kolusu

Worked 1st time

I guess I was getting confused when and where to use the 'INCLUDE COND=' vs. 'INCLUDE=' and the 'OUTREC BUILD=' vs. 'OUTREC='
What are the syntax rules for these statements?

Thanks again, Jim
Back to top
View user's profile Send private message
CICS Guy

Senior Member


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

PostPosted: Tue Sep 23, 2008 11:09 pm
Reply with quote

z/OS V1R8.0 DFSORT Application Programming Guide
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 How to split large record length file... DFSORT/ICETOOL 7
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
Search our Forums:

Back to Top