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

To set record limit for each include condition


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

New User


Joined: 13 Apr 2010
Posts: 35
Location: Chennai

PostPosted: Tue Apr 15, 2014 6:02 pm
Reply with quote

Guys,

I have a filter file(CSV) that carries the following data as below

(Header is just for understanding the layout, will not be present in the actual file)

Code:
Header - no. of recs,Value1,Value2,Value3,startpos,length
100,abc,pqr,xyz,21,3
50,werw,rmdw,poiu,24,4
100,a,b,c,28,1


In the above file I got 3 filters based on which I have to generate the sort cards.
I did below which is applicable when the filter file have only one record.
Code:
INCLUDE COND=(21,3,CH,EQ,C'abc'),OR,   
             (21,3,CH,EQ,C'pqr'),OR,
             (21,3,CH,EQ,C'xyz')
OPTION VLSHRT                             
SORT FIELDS=COPY,STOPAFT=100
OUTFIL FNAMES=SORTOUT,VTOF,OUTREC=(1:10,11)


Is there a way to generate a single sortcard even if the filter file has multiple records as above?

Note: I use REXX to convert the filter file in to a sort card.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Apr 15, 2014 6:14 pm
Reply with quote

Did you stick that through EXEC PGM=SORT?

Have you looked at field-type SS?

You'll have to explain what you want with your 100 and 50. Are the values mutually exclusive across your data? Or could some of the 50 and the second 100 be included within the first 100, etc?
Back to top
View user's profile Send private message
karthickpearl

New User


Joined: 13 Apr 2010
Posts: 35
Location: Chennai

PostPosted: Tue Apr 15, 2014 6:35 pm
Reply with quote

Woodger,

Quote:
Did you stick that through EXEC PGM=SORT?

Yes

Quote:
Have you looked at field-type SS?

I didn't get what you mean by "field-type SS".

Quote:
You'll have to explain what you want with your 100 and 50. Are the values mutually exclusive across your data? Or could some of the 50 and the second 100 be included within the first 100, etc?

They are mutually exclusive. Thats the reason each filter record have their own record limit.
Back to top
View user's profile Send private message
karthickpearl

New User


Joined: 13 Apr 2010
Posts: 35
Location: Chennai

PostPosted: Thu Apr 17, 2014 12:57 pm
Reply with quote

Guys,

Could some one please suggest a solution please?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Apr 17, 2014 5:05 pm
Reply with quote

I would suggest that you put your thinking cap on and tell us why asking here again for a solution is the answer.

People on this forum answer when they can on their own time.

Asking again is just RUDE.

I suggest you pay somebody a fee if you need this soon.

I am willing to work for 500 dollars a day.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Apr 17, 2014 5:47 pm
Reply with quote

As Bill suggested
check this link and this link
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Fri Apr 18, 2014 1:00 am
Reply with quote

Try something like:
Code:

INCLUDE COND=(21,3,SS,EQ,C'abc,pqr,xyz',OR
  24,3,SS,EQ,C'werw,rmdw,poiu',OR,
  28,1,SS,EQ,C'a,b,c')
SORT etc.
This is called a SUBSTRING function. In the reference manual go to the section for the INCLUDE statement and look for the "Substring Comparision" test.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Fri Apr 18, 2014 1:09 am
Reply with quote

KarthickPearl has left the building.

None of these solutions help the fact that he needs 100 of the first type, 50 of the second type, and 100 of the third, etc...
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Apr 18, 2014 2:22 am
Reply with quote

Correct, Dave. The SS just simplifies the test.

KarthickPearl, if you want to do multiple selections in one shot, you're going to have to code for it. You can limit the records on OUTFIL. You may even find multiple OUTFILs more convenient.

I think you have to describe more of what you are trying to do.
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top