| Title: | FOCUS, from INFORMATION BUILDERS |
| Moderator: | ZAYIUS::BROUILLETTE |
| Created: | Thu Feb 19 1987 |
| Last Modified: | Mon May 05 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 615 |
| Total number of notes: | 1779 |
Hello,
How to use the SUBSTR function in the DEFINE context ?
The documentation says :
SUSTR(inlength,infield,start,end,xxxxxxx,outfield)
I have tried to use this but without success .
Regards
Philippe
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 30.1 | Check out AUTORDB.FEX | MIDCIM::LINDQUIST | Wed Feb 03 1988 11:53 | 3 | |
You will find an example of SUBSTR in the program AUTORDB.FEX
which comes with FOCUS (assuming you have the RDB interface)
and it works.
| |||||
| 30.2 | MEMV01::VOSS | Thu Apr 14 1988 14:21 | 2 | ||
The xxxxxx in your example needs to be the length of the substring:
normally END - START + 1.
| |||||
| 30.3 | Is this what you want ? | PEKING::MCSHANEG | Alas poor Yorik..I knew him well | Tue Apr 04 1989 09:26 | 12 |
> How to use the SUBSTR function in the DEFINE context ?
DEFINE FILE DATAFILE
NEWFIELD/A10 = SUBSTR(80, ADDRESS, 1, 10, 10, NEWFIELD);
END
Where ADDRESS is an 80 char alpha field, the above will let NEWFIELD
eq the first 10 chars of the ADDRESS field.
Gary @ RDL
| |||||