Posted: Mon Jul 14, 2003 11:27 pm Post subject: nested searching in a string
hi,
My input can be any of the following,
Code:
FD=23,43 COM=34,01 HTR=93 ... or
RTY=94 COM=05 HTR=93 MP=26,41 ... or
COM=04,26,12 HTR=92 SUR=12,71 .. etc
I need to find out if 'COM' has symbol '03' or '04' in it ? Pls note that symbol (numbers after '=') will always be 2 bytes.
We use cobol OS 390 in our shop.
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
Posted: Tue Jul 15, 2003 2:27 am Post subject:
Blitz,
Have you considered using SORT? In DFSORT, you can use SS option for INCLUDE or OMIT. That is,
Code:
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,lrecl,SS,EQ,C'COM=03',OR,
1,lrecl,SS,EQ,C'COM=04')
/*
Note that, different PTF levels of DFSORT will support different values of lrecl. So, if the LRECL is very large, you will have to split each INCLUDE condition. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Jul 15, 2003 10:06 am Post subject:
Cogito said
Quote:
Note that, different PTF levels of DFSORT will support different values of lrecl. So, if the LRECL is very large, you will have to split each INCLUDE condition.
To clarify, if you have DFSORT R14 PTF UQ90053 (Feb, 2003) installed, the maximum length for an SS field used with INCLUDE and OMIT is 32752. If you don't have UQ90053 installed, the maximum length is 256. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum