× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.