> From: rnatesan@bactc.com (Ramki Natesan)
> Subject: process id as a temp file name in 4gl code
> To: informix-list@rmy.emory.edu
> Date: Fri, 20 Jan 1995 17:00:21 -0800 (PST)
>
> Hi,
> Could someone help me how to get process_id number, in 4GL, to create
> a tmp file under the name of the "pid.dat".
>
> eg: START REPORT xxxx TO pid.dat
>
> thanks,
> Ramki.
For your convenience:
/* function: fgl_getpid - return numeric process id
* author: Alan Popiel
* date: 23 Jan 1995
*
* usage:
* CALL fgl_getpid() RETURNING number
* LET number = fgl_getpid()
*
* CALL argument:
* none -- no error checking is done for presence of input arguments
*
* RETURNING argument:
* integer number -- numeric value of the process id
*/
int fgl_getpid(nargs)
int nargs;
{
retint( getpid() ); /* push process id onto stack */
return( 1 ); /* one argument returned */
}
Regards,
Alan
+---------------------------+-----------------------------------------------+
| R. Alan Popiel | Internet: alan@den.mmc.com |
| Martin Marietta, SLS | Voice: 303-977-9998 |
| P.O. Box 179, M/S 3810 | Standard disclaimers apply. Cutesy ones, too. |
| Denver, CO 80201-0179 USA | Your mileage may vary. Void where prohibited. |
+---------------------------+-----------------------------------------------+