|
This solution would only work if you've got the ability to change the program that you're trying to get the job number for.It would, furthermore, have to be re-written for each job that you wanted to use it for, so it wouldn't make a reusable routine. But it may make sense, depending on the situation that the original programmer is trying to solve. If it does not make sense, why not use the List Spooled Files API (QUSLSPL) to dump a list of all the spooled files into a user space, and search for the job name, etc that you require? Seems to me that this would solve things quite easily! On Thu, 21 Dec 2000 BillsVilla@aol.com wrote: > In a message dated 12/21/2000 2:41:57 PM Eastern Standard Time, > bbuettel@udilink.com writes: > > > > I need to get the user NAME and JOB NUMBER after the job completes for > > SNDNETSPLF for a CLP > > that runs the next Day. > > > > Easy enough. > > Use a program status data structure in the program to get the user name and > job number and update a data area to hold the data. > > Here is a sample of the Program Status Data Structure you will need. > D PSDS SDS > USRNAME 254 263 > JOB# 264 269 > > I don't know your needs but I would simply create a 16 character data area > and use it to store the 10 char name and 6 char job# and update it in the RPG > program. > > Sample data area setup you will need. > D DTAARA UDS > USRNAME 10 > JOB# 16 > > I don't know about all this other stuff people tell ya on here but I would do > it just like that. > > It doesn't get any easier. > > The program will pull the information from the PSDS (automatically) and when > the program ends it will (automatically) update the DTAARA for you. > > You could spend a couple days trying to figure out a tricked out way to do it > but the person comming behind you will have to do the same. > > I use the KISS method. > > Keep > It > Simple > Stupid > > Enjoy, > > Bill > +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.