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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


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