Operating System - OpenVMS
1846667 Members
4421 Online
110256 Solutions
New Discussion

Using sys$getjpiw doesn't return jpi$_tt_accpornam

 
Stephen Daddona
Frequent Advisor

Using sys$getjpiw doesn't return jpi$_tt_accpornam

I have a COBOL program that's using sys$getjpiw to get jpi$_username and jpi$_tt_accpornam. It always tries to get the info from its own process. When I run it from my account both items are returned, but I don't get jpi$_accpornam when I run it from a user account. It returns nulls. (I do get the username.) I set the privs for the program to W:RWE just in case, with no change. The call to the Data Division items look thusly:

01 ws_getjpi_username.
03 ws_username pic x(12) value spaces.
03 ws_username_length pic s9(04) comp.

01 ws_getjpi_tt_accpornam.
03 ws_tt_accpornam pic x(50) value spaces.
03 ws_tt_accpornam_length pic s9(04) comp.

01 ws_getjpi_iosb pic s9(09) comp.

01 getjpi_item_list.
03 name_list.
05 name_buf_lngth pic s9(04) comp value 14.
05 name_code pic s9(04) comp
value external jpi$_username.
05 name_buf_addr pointer value
reference ws_username.
05 name_ret_lngth pointer value
reference ws_username_length.
03 accpornam_list.
05 accpornam_buf_lngth pic s9(04) comp value 50.
05 accpornam_code pic s9(04) comp
value external jpi$_tt_accpornam.
05 accpornam_buf_addr pointer value
reference ws_tt_accpornam.
05 accpornam_ret_lngth pointer value
reference ws_tt_accpornam_length.
03 name_list_terminator pic s9(09) comp value 0.


And here's the call statement:

call 'sys$getjpiw'
using
omitted
omitted
omitted
by reference getjpi_item_list
by reference ws_getjpi_iosb
omitted
omitted
giving call_status.
if not ss$_normal
(blah, blah)

Both call_status and ws_getjpi_iosb come back with a value of +1.
5 REPLIES 5
Robert Gezelter
Honored Contributor

Re: Using sys$getjpiw doesn't return jpi$_tt_accpornam

Craig,

Where are you (what device and what connection) are you logging in from? Same for the user who is having the problem.

- Bob Gezelter, http://www.rlgsc.com
Stephen Daddona
Frequent Advisor

Re: Using sys$getjpiw doesn't return jpi$_tt_accpornam

I'm using SET HOST for me.

I've tried SET HOST and TELNET for the user account:

1) Running the program from a SET HOST process works.
2) Running the program from a TELNET process works.
3) Doing a runing the program from the spawned subprocess in 1 & 2 doesn't work, even though doing a $SHOW TERMINAL shows the same info for "Remote Port Info:" as the parent process.

This program that I'm writing has to be run from the users' login command procedure, so I'll have to run it from a spawned subprocess.
Doug Phillips
Trusted Contributor

Re: Using sys$getjpiw doesn't return jpi$_tt_accpornam

It's probably a physical device (TTan, TXan, OPan, etc) so when tt_accpornam returns a null use tt_phydevnam.

Stephen Daddona
Frequent Advisor

Re: Using sys$getjpiw doesn't return jpi$_tt_accpornam

I think that I'll punt and get the accpornam in the command procedure and pass it to the program via a job-level logical name.


Thanks for responses
Stephen Daddona
Frequent Advisor

Re: Using sys$getjpiw doesn't return jpi$_tt_accpornam

I used SYS$GETDVI instead.