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
 

 

To set record limit for each include condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: To set record limit for each include condition
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Tue Apr 15, 2014 6:14 pm    Post subject: Reply to: To set record limit for each include condition
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    Post subject: Reply to: To set record limit for each include condition
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    Post subject: Reply to: To set record limit for each include condition
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: 645
Location: Pennsylvania

PostPosted: Thu Apr 17, 2014 5:05 pm    Post subject:
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

Moderator


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

PostPosted: Thu Apr 17, 2014 5:47 pm    Post subject:
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: 183
Location: Toronto, ON, Canada

PostPosted: Fri Apr 18, 2014 1:00 am    Post subject: Reply to: To set record limit for each include condition
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: 645
Location: Pennsylvania

PostPosted: Fri Apr 18, 2014 1:09 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Fri Apr 18, 2014 2:22 am    Post subject: Reply to: To set record limit for each include condition
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    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 update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 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 with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm


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