|
Here's a snippet of code for the QUSRJOBI api: Procedure call & data retrieval: RtvJobInfo(OutputData :DataLength :'JOBI0700' :QualJob :InternalJob :ErrorCode_); JOBI0700=%Subst(OutputData:1:%Len(JOBI0700)); Prototype: DRtvJobInfo PR ExtPgm('QUSRJOBI') D OutputData 32767a D DataLength 10i 0 D RtvFormat 8a Const D QualJob 26a Const D InternalJobID 16a Const D ErrorCode_ 32767a Options(*Varsize) Varying JOBI0700 data structure: D JobI0700 DS Qualified d BytesReturned 10i 0 d BytesAvailable 10i 0 d JobName 10a d JobUser 10a D JobNumber 6a D JobInternalID 16a D JobStatus 10a D JobType 1a D JobSubtype 1a D Reserved 2a D LibsInSYSLIBL 10i 0 D NumberOfProductLibs... D 10i 0 D CurrentLibExist... D 10i 0 D NumberOfLibsInUSRLIBL... D 10i 0 D SYSLIBL 11a Dim(16) D PRODLIBL 11a Dim(16) D CURLIB 11a D USRLIBL 11a Dim(275) The job type (batch or interactive will be in JOBI0700.JobType and the job name will be in JOBI0700.JobName If you are using virtual unnamed devices for 5250 you can check %SUBST(JOBI0700.JobName:1:6) = 'QPADEV' to determine if the call is from a 5250 interactive session. Thanks, Tommy Holden -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of M.Effenberg@xxxxxxxxxxxx Sent: Tuesday, December 19, 2006 9:33 AM To: RPG programming on the AS400 / iSeries Subject: Re: calling a program from ws or web Hi Jim, you should take a look at the QUSRJOBI API in the IBM docs at http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/qu srjobi.htm This API provides you the information, if the job is interactive or in batch. But don't ask for an example, I never used it :) - Martin ------------- I'm trying to have 1 program to respond to requests from a ws session or from the web. How can you tell which way the program was called (ws session or web) so you can respond appropriately? Thanks Jim Horn
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.