Re: getting login name in 4GL
Posted in 1996
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
You don't need to do all that garbage. The following has _always_
worked starting with version 1.10.03.
select user from systables where tabid = 1;
} From: proussel@ix.netcom.com (Pierre Roussel)
} Subject: Re: getting login name in 4GL
} Date: Wed, 08 May 1996 02:02:34 GMT
} Reply-to: proussel@ix.netcom.com (Pierre Roussel)
} Organization: netcom.com
} To: informix-list@rmy.emory.edu
} mtidwell@netcom.com (montgomery f. tidwell) wrote:
}
} >Howdy,
}
} >does anyone know how i can get the login name of a User
} >from within a 4GL program?
}
} >TIA
} >--
} > There are three kinds of people in the World. Those who
} > can count, and those who can't.
}
} > \\\\//_
}
} Using Informix 4GL 4.10 and higher
}
} let user_name = fgl_getenv("LOGNAME")
}
} LOGNAME is the system variable initialized when you log on to
} a
} UNIX system (echo $LOGNAME)
}
}
} On earlier releases, create a temp table with a single char field,
} write the restricted 4GL variable USER to the temp table. Select
} from the temp table into a program variable (i.e. user_name) and
} drop the temp table.
}
} proussel@ix.netcom.com
}
}
-perryd (Guru)
====================================================================
= Perry Dillard - Chief Architect Direct Dial: (206)517-6430 =
= FourGen Software, Inc. FAX: (206)522-0054 =
= FourGen Building Tech. Support: (800)444-3398 =
= 115 NE 100th Street Sales: (800)333-4436 =
= Seattle, W.A. 98125-8098 =
= =
= e-mail: perryd@fourgen.com Web Site http://www.fourgen.com =
= =
= Home Page: http://www.geocities.com/SiliconValley/3198 =
====================================================================