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



Hi Douglas!

There is a cool little thing in RPG called the program status data
structure (or PSDS) which contains lots of interesting information,
including the user profile of the person running the program (actually
it's a little more involved than that, but this is enough to get you
started).

You access the PSDS by defining a special optional data structure in
your RPG program.  You can then define subfields to access the
individual pieces of data.  Some even have predefined special values for
the positions.  I don't have the exact code to get the user profile,
although I'm sure someone can supply it.  Here is an example using
hardcoded positions to get the job number and a special value to get the
program name:

D                sds               
D  xsjbno               264    269 
D  xspgm            *proc          

Hope this helps!

Joe

> From: D.W. Palme
> 
> I am very new to RPG and I have been searching the net and
> experts-exchange in an attempt to figure out how to acquire the userid
> of the person signed in and running a program with RPG.
> 
> I thought I could do it the same way as with a display file but that
did
> not work..
> 
> Would someone provide me a tiny bit of assistance here or at least
point
> me in the right direction?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.