|
Date: 9/17/98 7:38 PM
RE: API for Scanning ?
>Hi Folks,
>I seem to remember YEARS back when I was actually programming full-time,
>an "API" for scanning for a string in a field and you could call it
>along the lines of QCMDEXEC ?? or whatever it was... Any one recall ?
>Or if you are using a more current method to do this can you let me know
>?
>I wrote programs YEARS ago to accomplish this through OPNQRY but an API
>would be MUCH easier I'm SURE !!
>Thanks in advance !
>Chuck
Chuck;
QCLSCAN
Like this.
CALL 'QCLSCAN'
PARM TARGET
PARM TARGET_LEN
PARM STARTING_POS
PARM PATTERN
PARM PATTERN_LEN
PARM TRANS_LOW_UP
PARM TRIM
PARM WILD_CARD
PARM POS_FND
TARGET = numeric What you're looking into.
TARGET_LEN 3,0 Length of the TARGET variable is(not it's
contents)
STARTING_POS 3,0 Offset of where in TARGET to start search
PATTERN numeric Pattern you're looking for.
PATTERN_LEN 3,0 Length of Pattern Field(not it's contents)
TRANS_LOW_UP 1 Translate Lower case to Upper( 1 = Yes, 0 = No)
TRIM 1 Trims something or other. (1=Yes,0=No)
WILD_CARD 1 Wild card character
POS_FND 3,0 Position the string was found in target, zero
if not found.
The TARGET and PATTERN Can be any length alpha field. (like a description
field from a file).
You can call this program from RPG or CL.
The wild card is nice.
John Carr CDP
IBM Certified RPGIV Specialist
EdgeTech
804-739-7689
74711.77@compuserve.com
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.