Re: Session Id for program
Posted in 1998
SH Lim <sweehock@hotmail.com> wrote in article <6e54sl$2ne$1@news.xmission.com>... > > Hi, > Is there a way to find out the current session-id for the 4GL > program that is running ? In my 4GL program, I want to assign the > session id for the program concatenated with userid for example for an > outpur file. This would uniquely define a filename which will be > removed. > Any recommendations on unique filenames conventions in 4GL output > files ? > Thanks. If you want to get session-id, you need to write a shell script, which stores its session-id in variable and then runs 4GL program, which loads value of this variable using function FGL_GETENV(). When you want to run 4GL program, you just run that shell script. It should look like this: SESID=$$ export SESID fglgo program.4gi An another way of getting unique id is to use a table vith serial. When you need unique id, you insert one row to table, get serial number and then delete this row. I hope this helps you, -- Zdeno Mikl' SOFTEC s. r. o. tel.: +421 7 273 805 Kutuzovova 23 fax.: +421 7 272 537 831 03 Bratislava e-mail: ash@softec.sk Slovakia