Hello Michael,
The code below creates a share file folder on iseries and then fires off the
PC command to output the window user ID to this shared file folder. How can
the PC command accesses the share file folder without user manually
connect/map to it first?
thanks
RE: GETUSERNAME
• Subject:
• From: "Michael Smith" <msmith@xxxxxxxxxxxxxx>
• Date: Mon, 18 Jul 2011 08:30:59 -0400
• List-archive: <
http://archive.midrange.com/rpg400-l>
• List-help: <mailto:rpg400-l-request@xxxxxxxxxxxx?subject=help>
• List-id: RPG programming on the IBM i / System i <rpg400-l.midrange.com>
• List-post: <mailto:rpg400-l@xxxxxxxxxxxx>
• List-subscribe: <
http://lists.midrange.com/mailman/listinfo/rpg400-l>,
<mailto:rpg400-l-request@xxxxxxxxxxxx?subject=subscribe>
• List-unsubscribe: <
http://lists.midrange.com/mailman/listinfo/rpg400-l>,
<mailto:rpg400-l-request@xxxxxxxxxxxx?subject=unsubscribe>
________________________________________
Library NETSRVCMD
http://www-03.ibm.com/systems/i/software/netserver/qusrtool.html
MKDIR DIR('/home/temp/USERNAME') DTAAUT(*RWX) +
OBJAUT(*ALL)
ADDNSVFSHR SHARE(USERNAME) DIR('/home/temp/USERNAME') +
TEXT('User Name') ACCLVL(*RW)
CHGVAR VAR(&CMDSTRING) VALUE('CMD /C ECHO +
%USERNAME% > \\XXX.XX.XXX.XXX\USERNAME\J' +
*TCAT &JOBNBR *TCAT '.TXT')
/* Change MYFILE.TXT to &JOB + .TXT
*/
STRPCO
STRPCCMD PCCMD(&CMDSTRING) PAUSE(*NO)
Michael
As an Amazon Associate we earn from qualifying purchases.