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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Combine 2 OUTFIL's with different INCLUDE's in 1 sort step
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    Post subject:
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    Post subject: Reply to: Combine 2 OUTFIL's with different INCLUDE's in 1 s
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: 2150
Location: At my coffee table

PostPosted: Tue Sep 23, 2008 11:09 pm    Post subject:
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    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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm


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