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
 

 

How to use Include and exclude/Omit condition in same step ?
Goto page 1, 2  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
M.RAJAN

New User


Joined: 18 Jul 2005
Posts: 5
Location: chennai

PostPosted: Sun Feb 21, 2010 9:28 am    Post subject: How to use Include and exclude/Omit condition in same step ?
Reply with quote

Hi All,

I am new to this forum and trying to find out the alternate solution for the below problem.

My Input:

002 130 1000
002 130 2000
050 090 3000
123 999 4000
345 234 5000
001 234 6000
034 234 7000
025 233 8000
050 987 1500
023 365 9000

Expected Output:

002 130 2000
050 090 3000
050 987 1500

My code is,

SORT FIELDS=(1,15,CH,A)
INCLUDE COND=((1,3,CH,EQ,C'002',AND,9,4,CH,NE,C'1000'),OR,
(1,3,CH,EQ,C'050',AND,9,4,CH,NE,C'1000'))

it is working as expected. But i am trying to find out the alternate way, using Include and Exclude/Omit condition. I would like to get answer in DFSORT as well as SYNCSORT.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Feb 21, 2010 10:02 am    Post subject:
Reply with quote

Hello,

Your working syntax should work for both sort products.

Quote:
But i am trying to find out the alternate way, using Include and Exclude/Omit condition
Why? There would be no efficiencies gained. . .

I believe that neither product supports INCLUDE and OMIT in the same run. . . From the DFSORT manual:
Quote:
You can specify either an INCLUDE statement or an OMIT statement in the same DFSORT run, but not both.
Back to top
View user's profile Send private message
M.RAJAN

New User


Joined: 18 Jul 2005
Posts: 5
Location: chennai

PostPosted: Sun Feb 21, 2010 10:12 pm    Post subject: Reply to: How to use Include and exclude/Omit condition in s
Reply with quote

Thanks Dick,

Can you please give me a DFSORT and syncsort manual links ?
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: Sun Feb 21, 2010 10:16 pm    Post subject:
Reply with quote

DFSort: DFSORT/ICETOOL Reference Material
Syncsort, talk to the source.....
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Feb 22, 2010 12:11 am    Post subject:
Reply with quote

Hello,

Syncsort manuals are covered by copyright and we may neither post nor link to them.

If your organization is licensed to use the product, all of the material may be obtained from Syncsort support.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Tue Feb 23, 2010 2:57 am    Post subject:
Reply with quote

Please feel free to send me a PM or contact me offline at alissa.margulies@syncsort.com and I would be happy to assist you with acquiring the SyncSort manuals.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Feb 23, 2010 10:26 am    Post subject:
Reply with quote

Alissa wrote:
Please feel free to send me a PM or contact me offline at alissa.margulies@syncsort.com and I would be happy to assist you with acquiring the SyncSort manuals.

I was just wondering.. Is it free Alissa?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 23, 2010 10:38 am    Post subject:
Reply with quote

Hi Sambhaji,

Yes, if the organization has licensed the product. . .
Back to top
View user's profile Send private message
jctgf
Currently Banned

Active User


Joined: 04 Nov 2006
Posts: 109

PostPosted: Mon Mar 01, 2010 1:20 am    Post subject:
Reply with quote

maybe you can use the IFTHEN statement combined either with the include OR the omit statement.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 01, 2010 2:24 am    Post subject:
Reply with quote

Hello,

How does this reply abput IFTHEN relate to the problem using both INCLUDE and OMIT in the same process. . . icon_sad.gif

As quoted earlier from the manual:
Quote:
You can specify either an INCLUDE statement or an OMIT statement in the same DFSORT run, but not both.
Back to top
View user's profile Send private message
jctgf
Currently Banned

Active User


Joined: 04 Nov 2006
Posts: 109

PostPosted: Mon Mar 01, 2010 3:41 am    Post subject:
Reply with quote

he said he wanted an alternate way of selecting records.
he could use the inrec ifwhen to flag the records and then discard/maintain them either with a simplified omit or include statement.
i wouldn't do that, but it's an "alternate way".
he can use omit and include in the same step since he uses sortfil, and the many outputs can be concatenated if he uses icetool.
these are possibilities, only.
i'd maintain the include statement as presented in the original post, though. to me, it's the best solution since it does what he needs.
regards.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 01, 2010 4:42 am    Post subject:
Reply with quote

Hello,

Have you successfully done "both" in the same Syncsort execution?

Please post only successfully tested "solutions" and the informational system output from them.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2168
Location: @my desk

PostPosted: Mon Mar 01, 2010 7:01 am    Post subject:
Reply with quote

Quote:
he can use omit and include in the same step since he uses sortfil, and the many outputs can be concatenated if he uses icetool
jctgf,

What did you mean by the above statement? icon_rolleyes.gif
Back to top
View user's profile Send private message
jctgf
Currently Banned

Active User


Joined: 04 Nov 2006
Posts: 109

PostPosted: Mon Mar 01, 2010 4:40 pm    Post subject:
Reply with quote

hi,
i think this way is simpler.
both include and omit at the same step.
Code:

//*---------------------------------------------------------------------
//SORT      EXEC  PGM=SORT,REGION=40M                                   
//$ORTPARM  DD DSN=CARDLIB(EVTD010Y),DISP=SHR                           
//SYSOUT    DD SYSOUT=*                                                 
//SORTIN    DD *                                                       
1                                                                       
2                                                                       
//O1        DD SYSOUT=*                                                 
//O2        DD SYSOUT=*                                                 
//SYSIN     DD *                                                       
  SORT FIELDS=COPY                                                     
   OUTFIL FNAMES=O1,INCLUDE=(1,1,ZD,EQ,1)                               
   OUTFIL FNAMES=O2,OMIT=(1,1,ZD,EQ,1)         
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2168
Location: @my desk

PostPosted: Mon Mar 01, 2010 6:50 pm    Post subject:
Reply with quote

jctgf wrote:
hi,
i think this way is simpler.
both include and omit at the same step.
Simpler..huh icon_eek.gif For what?
Back to top
View user's profile Send private message
jctgf
Currently Banned

Active User


Joined: 04 Nov 2006
Posts: 109

PostPosted: Mon Mar 01, 2010 8:32 pm    Post subject:
Reply with quote

simpler than using icetool.
this is just an "alternate way", as required in the original post.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2168
Location: @my desk

PostPosted: Mon Mar 01, 2010 8:49 pm    Post subject:
Reply with quote

Quote:
this is just an "alternate way"
The jcl posted by you nowhere relates to the original requirement. Please dont post some crap just for the sake of providing some quick 'alternative'
Back to top
View user's profile Send private message
somunote

New User


Joined: 23 Jan 2010
Posts: 7
Location: Toronto

PostPosted: Tue Mar 09, 2010 5:25 am    Post subject:
Reply with quote

Quote:

I believe that neither product supports INCLUDE and OMIT in the same run. . . From the DFSORT manual:
Quote:
You can specify either an INCLUDE statement or an OMIT statement in the same DFSORT run, but not both.


Quote:

The jcl posted by you nowhere relates to the original requirement. Please dont post some crap just for the sake of providing some quick 'alternative'



why is it crap?
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: Tue Mar 09, 2010 5:37 am    Post subject:
Reply with quote

Well, if the question was "how can I use INCLUDE and OMIT in the same step to create separate data sets", then your solution would apply. But nobody said anything about separate data sets. Of course, you could have another step to bring those separate data sets together, but that would require another pass.

The fact is you cannot use an INCLUDE statement and an OMIT statement in the same run. You can certainly use one INCLUDE statement or one OMIT statement for multiple conditions that would include or omit records. You can use IFTHEN clauses to set flags that could then be used in OUTFIL INCLUDE. You could do lots of things to solve particular problems. But in this case, it's not clear what the original poster even wanted to do with INCLUDE and OMIT, so it's difficult to say what's relevant as a solution.

I think the original poster got tired of the discussion a long time ago so it's not likely we'll get any clarification.
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 Mar 09, 2010 5:40 am    Post subject:
Reply with quote

Well put Frank, is it time to just lock the Topic?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts 2 vsam file compare and update a fiel... ABINAYATHULASI DFSORT/ICETOOL 6 Sun May 29, 2016 11:15 am


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