View previous topic :: View next topic
|
Author |
Message |
M.RAJAN
New User
Joined: 18 Jul 2005 Posts: 5 Location: chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
M.RAJAN
New User
Joined: 18 Jul 2005 Posts: 5 Location: chennai
|
|
|
|
Thanks Dick,
Can you please give me a DFSORT and syncsort manual links ? |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Sambhaji,
Yes, if the organization has licensed the product. . . |
|
Back to top |
|
|
jctgf Currently Banned Active User
Joined: 04 Nov 2006 Posts: 109
|
|
|
|
maybe you can use the IFTHEN statement combined either with the include OR the omit statement. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
How does this reply abput IFTHEN relate to the problem using both INCLUDE and OMIT in the same process. . .
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 |
|
|
jctgf Currently Banned Active User
Joined: 04 Nov 2006 Posts: 109
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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? |
|
Back to top |
|
|
jctgf Currently Banned Active User
Joined: 04 Nov 2006 Posts: 109
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
jctgf wrote: |
hi,
i think this way is simpler.
both include and omit at the same step. |
Simpler..huh For what? |
|
Back to top |
|
|
jctgf Currently Banned Active User
Joined: 04 Nov 2006 Posts: 109
|
|
|
|
simpler than using icetool.
this is just an "alternate way", as required in the original post. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
somunote
New User
Joined: 23 Jan 2010 Posts: 7 Location: Toronto
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Well put Frank, is it time to just lock the Topic? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
is it time to just lock the Topic? |
Yes - done. |
|
Back to top |
|
|
|