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

Sort O/P with selection and SORT


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

New User


Joined: 03 May 2007
Posts: 27
Location: India

PostPosted: Thu Jun 11, 2009 4:49 pm
Reply with quote

Dear Team,

I need to select only the accounts with below criteria

SORT FIELDS=COPY
INCLUDE COND= (11,2,CH,EQ,C’AD’,AND
65,2,CH,EQ,C’00’)

and as well as Sort the output based on

(1,3 and 4,19)

Please let me know if we can combine both the steps.

Thanks & Regards,
Nivasaya
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 11, 2009 4:54 pm
Reply with quote

Yes, substitute the FIELDS=COPY with the fields that you wish sorted.
Back to top
View user's profile Send private message
nivasaya

New User


Joined: 03 May 2007
Posts: 27
Location: India

PostPosted: Fri Jun 12, 2009 9:31 am
Reply with quote

Thanks Expat. Also please let me know the following senario:

I Need to include 3 conditions:

1) SORT FIELDS=(1,22,CH,A)

2) INCLUDE 11,2,CH,EQ,C’AD’,AND
65,2,CH,EQ,C’00’
3) OMIT 1,1,CH,EQ,C’3’,AND
7,5,CH,NE,C’00003

Please let me know if this is fine:
SORT FIELDS=(1,22,CH,A)
INCLUDE COND =(11,2,CH,EQ,C’AD’,AND
65,2,CH,EQ,C’00’)
OMIT COND= (1,1,CH,EQ,C’3’,AND
7,5,CH,NE,C’00003)


Thanks & Regards,
Nivasaya

And SORT GMAD-PRIMARY-CMS-ORG and GMAD-PRIMARY-CMS-ACCT

To O/P file SORTED GMAD file.

AND eliminate AMEX accounts as well.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Fri Jun 12, 2009 11:26 am
Reply with quote

nivasaya,

I dont think you can code both INCLUDE and OMIT together. And I wonder how you expected somebody here to know how to sort "GMAD-PRIMARY-CMS-ORG" and "GMAD-PRIMARY-CMS-ACCT" and eliminate "AMEX accounts".

Post some more info which makes some sense like field-positions, field lengths, field formats and keywords to identify and process records selectively.
Back to top
View user's profile Send private message
nivasaya

New User


Joined: 03 May 2007
Posts: 27
Location: India

PostPosted: Fri Jun 12, 2009 1:41 pm
Reply with quote

Sorry ARCVNS

I need to do the following conditions:

1) SORT FIELDS=(1,22,CH,A)

2) INCLUDE 11,2,CH,EQ,C’AD’,AND
65,2,CH,EQ,C’00’
3) OMIT 1,1,CH,EQ,C’3’,AND
7,5,CH,NE,C’00003

Please ignore the other info, which is irrelevent.

Thanks & Regards,
Nivasaya
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Sat Jun 13, 2009 1:31 am
Reply with quote

nivasaya,

Try these control cards

Code:

  INCLUDE COND=(01,1,ZD,EQ,3,AND,
                07,5,ZD,EQ,3,AND,
                11,2,CH,EQ,C’AD’,AND,
                65,2,CH,EQ,C’00’)

  SORT FIELDS=(1,22,CH,A)
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sat Jun 13, 2009 8:43 am
Reply with quote

Hi Skolusu,

how does the omit come into your example ?

With your example nothing will ever be selected as byte 11 cannot be both a 3 and an A.

Gerry
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Sat Jun 13, 2009 8:53 am
Reply with quote

gcicchet,

The omit cond is looking for pos 1 , not pos 11
Quote:
OMIT 1,1,CH,EQ,C’3’,AND
7,5,CH,NE,C’00003
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sat Jun 13, 2009 9:08 am
Reply with quote

Hi Skolusu,

doesn't
Code:
07,5,ZD,EQ,3,AND,
expect a value of 3 in pos 11,

and
Code:
11,2,CH,EQ,C’AD’
expect a value of A in pos 11 ?


Gerry
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Mon Jun 15, 2009 10:12 pm
Reply with quote

gcicchet,

I was merely trying to replicate the sort cards provided by OP and failed to notice the overlapping fields. sorry about that.
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top