Re: How to find out VAX/VMS username via SQL*Forms 3.0?

From: Grant Johnson <445362_at_aisserver2.llnl.gov>
Date: 2 Mar 94 11:04:47
Message-ID: <445362.94Mar2110447_at_aisserver2.llnl.gov>


We use the following Pro*C user-exit (getuid.pc):

#include <stdio.h>
#include "usrxit.h"
 

EXEC SQL BEGIN DECLARE SECTION;
        VARCHAR ora_uid[9];
EXEC SQL END DECLARE SECTION;
EXEC SQL INCLUDE SQLCA.H;  

char     GETUID(p, paramlen, erm, ermlen, query)
register    char       *p;                   /* Parameter string */
            int        *paramlen;            /* Ptr to param string length */
            char       *erm;                 /* Error message if doesnt match */            int        *ermlen;              /* Ptr to error message length */
            int        *query;               /* Ptr to query status flag */
{
        char uid_str[L_cuserid];
 
        cuserid(uid_str);
        strcpy(ora_uid.arr,uid_str);
        ora_uid.len = strlen(ora_uid.arr);
 
        EXEC IAF PUT header.os_id VALUES (:ora_uid) ;
}
Grant Johnson                                 Internet: grantj_at_llnl.gov
Lawrence Livermore National Lab	           PacBell Net: (510) 423-0406
Received on Wed Mar 02 1994 - 11:04:47 CET

Original text of this message