Te copio la información obtenida de esta dirección:¿Sabéis si existe alguna forma, API o similar, de recuperar desde un programa (CL, RPG) el usuario de windows que se está utilizando en el PC que tiene iniciada una sesión?
http://www.systeminetwork.com/isnetforums/archive/index.php?t-42574.html
y, por lo que dice al final, funciona.
Saludos
---------------------------------------------------------------------------------------------------------------
Create a directory in the IFS and share it read/write via iSeries Navigator.
(configure and start Netserver).
STRPCO
MONMSG CPF0000
STRPCCMD PCCMD('CMD /C ECHO %USERNAME% > \\mynetserver\MYSHARE\MYFILE.TXT') PAUSE(*NO)
Now the Windows user name is stored in stream file MYFILE.TXT
You can use a unique filename, f.e. the jobname to store
the data. Then use first RTVJOBA command.
Then use CPYFRMSTMF command to convert the stream file to a database
file for processing in your COBOL program.
-----------------------------
thanks for the tip, it works fine
-- Antonio Fernandez-Vicenti [EMAIL PROTECTED]
