|
View previous topic :: View next topic
|
| Author |
Message |
karthickpearl
New User
Joined: 13 Apr 2010 Posts: 35 Location: Chennai
|
|
|
|
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 |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
karthickpearl
New User
Joined: 13 Apr 2010 Posts: 35 Location: Chennai
|
|
|
|
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 |
|
 |
karthickpearl
New User
Joined: 13 Apr 2010 Posts: 35 Location: Chennai
|
|
|
|
Guys,
Could some one please suggest a solution please? |
|
| Back to top |
|
 |
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
 |
Pandora-Box
Global Moderator
.jpg)
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
| Back to top |
|
 |
jerryte
Active User

Joined: 29 Oct 2010 Posts: 205 Location: Toronto, ON, Canada
|
|
|
|
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 |
|
 |
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|