[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

528.0. "help creating lib$get_symbol subroutine - COBOL" by MELEE::DBA () Tue Aug 18 1992 16:08

    I am trying to write a subroutine which does a LIB$GET_SYMBOL using
    COBOL. I have compiled and linked into the fuselib procedures. This
    is a COBOL procedure which has worked on it's own before, but when
    invoking the subroutine via FOCUS, it returns nothing.
    
    I do a global symbol in DCL before even running focus.
    
    $request_id :== abcd1234
    
    The next reply will contain the cobol program and the fex which
    I am trying to use to produce the symbol in focus. If someone 
    sees anything obvious or knows what is needed to make this work,
    I would be eternally grateful.
    
    John
T.RTitleUserPersonal
Name
DateLines
528.1the cobol program for lib$get_symbolMELEE::DBATue Aug 18 1992 16:0913
IDENTIFICATION DIVISION.
PROGRAM-ID. GETSYM.
DATA DIVISION.
WORKING-STORAGE SECTION.
LINKAGE SECTION.
01  SYMBOL_NAME		        PIC X(20).
01  SYMBOL_VALUE                PIC X(80).
PROCEDURE DIVISION USING SYMBOL_NAME, SYMBOL_VALUE.
BEGIN.
                CALL "LIB$GET_SYMBOL" USING
                        BY DESCRIPTOR SYMBOL_NAME
                        BY DESCRIPTOR SYMBOL_VALUE.
    
528.2the fex to executeMELEE::DBATue Aug 18 1992 16:102
-SET &VAL = GETSYM('REQUEST_ID','A80');
-TYPE &VAL
528.3EVTDD1::CARRIEREJean-Claude CarriereFri Aug 28 1992 13:0715
Hello,

	I think you routine fails because the LIB$GET_SYMBOL routine
	requires an exact match, e.g. no trailing spaces.
	Here you have symbol_name declare as x(20) therefore the
	descriptor is pass as such.

	You should add one parameter to the GETSYM routine to pass
	the lenth of the SYMBOL_NAME and build the corresponding
	descriptor to call LIB$GET_SYMBOL

	Hope this help.

Regards
Jean-Claude.