× 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 Charles

If you need to place files (xls,PDF,txt etc.) in a "public" Windows network
folder
while avoiding Windows credentials checking then let me suggest 2 other
options.

1. *NFS *
On your Windows file server you set up a NFS server and configure a
"public" folder to
permit "anonymous" NFS access .
you then "mount" this windows folder over an existing IFS folder using the
i's ADDMFS CMD

When your applications put a file into this "local" IFS folder, the system
automatically
write it to the mounted Windows folder and since the access is "anonymous"
no credential conflicts arise.
pros:
No need for a "common" i and Windows user profile .
(same name and password on the i and the Windows domain)
Apllication-wise simple. applications on the i just put files in a IFS
folder
(No QDLS please).

cons:
Slowness - NFS is slow (sometimes very) to write the file to the Win folder
( seconds)
Security risk - granting Anonymous access to a folder in the Win file
server is well, risky
Complicated (for me anyway) - it took me a lot of Googling and testing to
set it up.

2. *Common user + QNTC + SBMJOB*
Set up a user profile that has the same credentials on the i and in the Win
domain .
(Grant all users on the i authority to this USRPRF)
Use QNTC and MKDIR to map a Windows folder to IFS folder
Instead of using Swap User Profile just submit a job to copy the the file
to the target
(QNTC) folder.
SBMJOB lets you specify a user profile for the submitted job - use the
common user A/M
pros:
Simple
cons;
Asynchronous, You have to notify the user in some manner that the file has
been successfully put in the Win folder

HTH
Gad

P.S.
I think that both ADDMFS and MKDIR should be executed after IPL. I suggest
addind them to QSTRUP.








message: 3
date: Thu, 30 May 2013 03:48:29 +0000
from: Charles Pascoe <cpascoe@xxxxxxxxxxxxxxxxx>
subject: Re: Swapping User Profiles within CLP via RPGLE using CALLP.

Attn: Shannon O'Donnell or Scott Klement

The ultimate goal of this process (for us) is to imbed a call to the
program to swap users to a common user that exists on the Windows Network
and create an .XLS or .XLSX file from a spool file and write it out to a
Network Folder.

Scott - Below is the relevant code that I referred to in the email that I
sent to you.

Brief history:
All the code CLP & RPGLE was downloaded from Midrange Programmer OS/400
Edition Vol 2, Number 14 - July 17, 2003.
Author is Shannon O'Donnell.
The code below is original from the site - unmodified.
I understand, from researching QSYGETPH that IBM has made changes to the
parms for this API since the time that Shannon initially created the source.
I have tried several different suggestions from the web as modifications
to the source to no avail.

What is happening when calling the CLP: SWAPTESTU:
a) Retrieves the calling User Profile ID - and stores it as &ORGUSER.
b) Calls the Swap User Profile program (SWAPUSRPRF) using parms for
&USERID & &PASSWORD.
c) Then issues the command WRKSPLF.
d) Then calls the Swap User Profile program again - using the
&ORIGUSER as the &USERID and *NoPwdChk as the &PASSWORD.
e) Then again issues the command WRKSPLF.

The results are:
a) If SWAPTESTU is called specifying a valid USERID as the &USERID
and '*NoPwdChk' as the &PASSWORD - then the process works - the first
issuance of WRKSPLF will display spool entries for the &USERID and the
second issuance of WRKSPLF will display spool entries for the &ORIGUSER.
b) If SWAPTESTU is called specifying both a valid USERID and its
associated PASSWORD as the &USERID and &PASSWORD - then, on both issuances
of WRKSPLF only the spool entries for the &ORIGUSER will be displayed.

Attached is the source for both the CLP and RPGLE code.




All help and assistance from you or anyone else will be most appreciated.



Charles Pascoe
Programming Supervisor
LASCO Fittings, Inc.
414 Morgan Street
P.O. Box 116
Brownsville, TN 38012
(731) 779-1882 Fax (731) 772-7116
cpascoe@xxxxxxxxxxxxxxxxx<mailto:cpascoe@xxxxxxxxxxxxxxxxx>
Think Green! Please consider before printing.
[cid:image001.png@01CD5A98.DB3C8DC0]
[cid:image002.png@01CD5A98.DB3C8DC0]





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.