| 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 |
Given:
FOCUS v5.2.2
ECHO=ON - debug purpose
Question:
What is the proper syntax used to pass a variable containing a
space?
- I tried to enclose the variable in single quotes
('John Doe') but that didn't work either.
Problem:
FOCUS not able to process variables which include a space.
I am trying to pass a variable to focus wich includes a space
(ex. firstname lastname).
^
Steps:
1) I EX the fex without supplying the variables forcing FOCUS
to prompt me for them
&1 = 123456 - worked corectly
&2 = JOHN DOE - received error while processing
2) FOCUS accepted the variables and placed them within my code
(all appeared fine).
3) My first HOLD file was created
4) I received the following error
(FOC002) A WORD IS NOT RECOGNIZED : DOE
(LASTNAME OF &2 variable)
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 400.1 | need to see code (I think) | CRATE::KEEGAN | Tue Mar 05 1991 03:47 | 13 | |
I would have thought that enclosing the variable in single quotes
would have done the job.
Any chance of seeing the relevant part of the code ?
This should help solve the problem.
Regards
Paul
| |||||
| 400.2 | Related code - passing variables | ISLNDS::MORIN | Tue Mar 05 1991 08:01 | 26 | |
Here is the segment of the code creating the hold files:
TABLE FILE CAP
SUM SELF SUB BOSS PEER SELF_CNT SUB_CNT BOSS_CNT PEER_CNT
BY PRTCPT_BADGE
BY R_DCQ_ID
BY D_QUESTN_ID
IF D_PRTCPT_BDG EQ &1
ON TABLE HOLD AS CAP1
END
DEFINE FILE CAP
STD_RESP/I1 = EDIT(DCQ_STD_RESP);
END
TABLE FILE CAP
PRINT STD_RESP
BY PRTCPT_BADGE
BY STD_DCQ_ID
BY STD_QUESTID
BY TRAIT_CD
BY TRAIT_DESC
IF D_PRTCPT_BDG EQ &1
IF STD_DCQ_ID EQ &2
ON TABLE HOLD AS CAP2
END
| |||||
| 400.3 | I think this works | MILPND::MADDEN | Tue Mar 05 1991 16:23 | 3 | |
Try putting quotes like this; IF FIELDNAME EQ '&2'
otherwise focus may be thinking, if fieldname eq john with doe being
the next thing.
| |||||