That offset is the job user. You want the _current_ user from the PSDS (pos. 358-367).
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Kevin Bucknum
Sent: Wednesday, October 20, 2010 10:50 AM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] RPGLE Stored procedure user.
Not sure if this belongs here or in the RPG400 or SQL lists, but I'll start it here.
We are migrating our green screen applications to web using PHP. As part of this I have created several stored procedures that call some utility programs to avoid having to move too much business logic into the PHP for the time being. I just ran into my first program where I do actual updates on files. In most of our files we track the user that created the record, and retrieve this from positions 254-263 in the program status data structure. Unfortunately this contains QUSER when called from my stored procedure. I searched, and haven't really come across anything that seems relevant. Anyone know of a work around for this?
Here is my stored procedure creation statement if it helps any:
CREATE PROCEDURE &LIB/UCHGOPNPRC (
IN @PTNO CHAR(9), IN @TRDT DECIMAL(8,0),
IN @TRSQ DECIMAL(4,0), IN @HLDS CHAR(1),
IN @HSFL CHAR(1), IN @COCD CHAR(2),
IN @COFL CHAR(1), IN @TRFAM DECIMAL(7,2),
IN @TRFFM CHAR(5), IN @TRFTO CHAR(5),
IN @TRFL CHAR(1), IN @PUSER CHAR(10),
IN @PPGM CHAR(10), IN @CKEY DECIMAL(7,0),
IN @CURA CHAR(10), IN @CLCD CHAR(5))
LANGUAGE RPGLE
SPECIFIC &LIB/UCHGOPNPRC
NOT DETERMINISTIC
NO SQL
CALLED ON NULL INPUT
EXTERNAL NAME '&LIB/UCHGOPN'
PARAMETER STYLE GENERAL;
Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550
As an Amazon Associate we earn from qualifying purchases.
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.