Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    6

    Unanswered: function for getting environment variables in procedure

    Hi,

    How do I get enviromnent variables in stored procedure codes?

    I don't know which build-in function or keyword can let me get
    environment variables in stored procedure codes.

  2. #2
    Join Date
    Jul 2004
    Posts
    6

    4GL function, fgl_getenv, cannot be resolved for procedure

    Hi,

    I added a 4GL function, fgl_getenv, for the stored procedure.
    But, failed.
    674: Routine (fgl_getenv) can not be resolved.


    create procedure p1() returning CHAR(10);

    define ret1 CHAR(10);

    let ret1 = fgl_getenv("USER"); -- environment variable USER for example

    return ret1;

    end procedure;



    How should I do? If I need to get environmnet variables when I
    execute this stored procedure.

  3. #3
    Join Date
    Aug 2012
    Posts
    1

    Reading environment variables in stored procedures

    Hi, can you tell me if you found a solution to reading environment variables into a stored procedure, either getting fgl_getenv to work or by another method?

    Thanks

  4. #4
    Join Date
    Sep 2011
    Location
    Pont l'Abbé, Brittany, France
    Posts
    381
    Provided Answers: 1
    Hi,

    you can create a stored procedure by linking a .so issued from a C program, and even from a 4gl program

    In this case you just need the getenv() C function

  5. #5
    Join Date
    Jun 2009
    Location
    Lisboa, Portugal
    Posts
    78
    Dolphin4022,

    I just created that procedure into one database and had no problem...
    This procedure is created in the database and then you call it. You don't need 4GL for it, However you can use also fgl_getenv(" ENVIRONMENT VARIABLE").
    LS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •