AS/400 >> CL check for user

by Darth Ferret » Thu, 26 Jan 2006 10:15:53 GMT

I need to modify a CL program to do one thing if QSYSOPR is calling it, and
something different for anyone else. In my System/36 days I could have done
the following:

// IF ?USER?/QSYSOPR CALL XYZ
// IF ?USER?/QSYSOPR RETURN

How would I do this in CL to check whether the user who submitted a job was
QSYSOPR. Then I would call a different program, and exit. Otherwise, I would
let it fall through and execute the rest of the present CL program.

Thanks in advance,
Joe in Florida



AS/400 >> CL check for user

by Saml » Thu, 26 Jan 2006 10:39:44 GMT


Prompt the RTVJOBD command. There are a couple of parms to return the
current user and current user profile. They can return different values, so
check the help for each.

Sam

AS/400 >> CL check for user

by Saml » Thu, 26 Jan 2006 11:34:47 GMT

Woops. I think I meant RTVJOBA. (Excuse--at home, no green screen.)

Sam

AS/400 >> CL check for user

by Jonathan Ball » Thu, 26 Jan 2006 14:55:17 GMT


pgm
dcl &user type(*char) len(10)
rtvjoba user(&user)
if cond(&user *eq 'QSYSOPR') then(do)
/* do your stuff */
enddo
else (do)
/* do some other stuff */
enddo
return
endpgm

AS/400 >> CL check for user

by Dale Berta » Wed, 01 Feb 2006 09:06:49 GMT

I don't remember this being possible with SSP, but with OS/400 it's entirely
possible that the user the job is running as is not the same as the user
that submitted the job. See SBMJOB keyword USER; it defaults to *CURRENT,
but you can submit on behalf of any user if you have sufficient authority to
the user profile. Unfortunately, submitting information is not available
from RTVJOBA; I think you'll need to use the QUSRJOBI API, format JOBI0300.

Similar Threads

1. user check existense(CL) ? - AS/400

2. CL programming: Checking if a member exists

What command can I use in my CL to determine if a particular member of
a file exists?

Thanks
Dan

3. JOB check in CL - AS/400

4. CL Program to change user profile password

I am having problem writing a CL program that changes default user
profiles. I run ANZDFTPWD command and copy the spool file into flat
file. What I want to do with this file is to import this file into my
CL program and ramdon change the user password in the file. I want to
change there default password to anything other than there default.

I have the necessary authority to change user profile.Authority is not
an issue. The program works only if I specified the user that I want to
change from the file. I want the program to automatically read this
file change all the users in the file. 

Any ideas will be appreciated.

5. How can i see (in a CL program) if a user is on-line - AS/400

6. User/Password Check API

Hello,

I am attempting to write an RPGLE  program that receives, as input, a user
name and password. I need to see if the user name and password are a valid
AS/400 login (user profile). If the user/password is invalid I will return
an error to the calling program. I also can do this from ILE/C, but that's
my last resort really. Does anyone know of an API or method that will allow
me to do this? I've checked the API reference and can only find programs
that let you change a job's user, but nothing that validates a
user/password.

Any help would be greatly appreciated.

Larry


7. _ropen level check checking - AS/400

8. Reality checked (was IL2 1946 - reality check)

On Sat, 13 Dec 2008 13:28:59 GMT, Howard Goldstein < XXXX@XXXXX.COM > wrote:
 :  In original IL2 even the earliest modelled sturmovik had usable rudder
 :  and aileron trim controls.  But in IL2 1946 I don't seem to be able to
 :  trim the  puppy in roll or yaw.  I can trim for those axes in other
 :  airplanes that feature the relevant trim indicators in the cockpit but
 :  not the sturmovik.  Is it just me or is this the expected behavior?  TIA

In case anyone else runs into this the presence or absence of yaw and
roll trim in any particular airplane is indicated by a cockpit
depiction of the relevant trim indicator, so if there's no yaw trim
indication there is no yaw trim on the airplane.  (Good thing almost
everything except the big old Soviet bomber has pitch trim, not having
that must have been a nightmare to the actual pilot).  This is
different from the original IL2 where trim was available in the sim.

So in short, no roll or yaw trim on the Sturmovik.  Now if only I could
persuade the x45 joystick driver to fake the trim for me.  Lacking seat of
the pants cues makes this almost a necessity, but not quite since
there are other mud movers with yaw trim....