[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ilbbak::ibi_focus

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

400.0. "Passing variables containing a space" by ISLNDS::MORIN () Mon Mar 04 1991 22:16

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.RTitleUserPersonal
Name
DateLines
400.1need to see code (I think)CRATE::KEEGANTue Mar 05 1991 03:4713
    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.2Related code - passing variablesISLNDS::MORINTue Mar 05 1991 08:0126
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.3I think this worksMILPND::MADDENTue Mar 05 1991 16:233
    Try putting quotes like this;   IF FIELDNAME EQ '&2'
    otherwise focus may be thinking, if fieldname eq john with doe being
    the next thing.