|
Name, user and number are "bean properties" of the Job class, so the get methods just echo back what you provide via the c'tor or the set methods. Where is you application running? If on a client then check out the getJob () method in command call or program call in the v5r1 or JTOpen 2.02 version of the Toolbox. Internally Job uses program call to carry out its tasks so the 'current job' is the program call server job. To get info on that job do: AS400 as400 = new AS400(); CommandCall cc = new CommandCall(as400); RJob rj = cc.getJob(); System.out.println("name: " + rj.getName()); System.out.println("user: " + rj.getUser()); System.out.println("number: " + rj.getNumber()); Note getJob() actually returns an RJob object, which is part of the resource package that is new to the Toolbox in v5r1. If on the AS/400 and the AS/400 is v4r5 or earlier, then getJob() returns data on the program call server job. If the AS/400 is v5r1 the getJob() returns data on the job running the java program. This works because in v5r1 program call has an option to run programs in the Java job via a JNI call instead of going through the program call server. (You probably noticed the hole -- you are running on the AS/400 which is v4r5 or earlier and you want data on the job running the java program, not the program call server job. I don't know how to get this data via the Job object. Respond if this is your case. The expert on the Job object is out until Monday but I will ask him when he gets back). Hope this helps, David Wall AS/400 Toolbox for Java "Annalur, Pavan" <Pavan.Annalur@aig To: "'JAVA400-L@midrange.com'" <JAVA400-L@midrange.com> .com> cc: Sent by: Subject: JOB Class in AS/400 Toobox for java with VAJ 3.5 ENT owner-java400-l@mi drange.com 07/10/2001 11:36 AM Please respond to JAVA400-L Is there any problem with the methods getUser(), getNumber() for the Job class in AS/400 toolbox version with VAJ 3.5, I am not able to get any value returned from these methods where as I am able to obtain values from other methods like getJobDescription() etc... OS Version = 4.4 Program code : as400 = new AS400("ourhost", userid, password); as400.connectService(AS400.RECORDACCESS); Job job = new Job(as400,"*","",""); System.out.println(" No fo librarries in Sys Lib>> " + job.getNumberOfLibrariesInSYSLIBL()); System.out.println(" Job Description >> " + job.getJobDescription()); System.out.println(" Job Name >> " + job.getName() ); System.out.println(" Job Number >> " + job.getNumber() ); System.out.println(" Job User >> " + job.getUser()); Output message>> as below: No fo librarries in Sys Lib>> 4 Job Description >> QSYS/QZBSJOBD Job Name >> * Job Number >> Job User >> However I knew that, this Connection service uses the job QZRCSRVS. In VAJ debug mode, I could see the attributes the job number etc, however when printed them , I am not able to get the values. Is there any problem ? Thanks in advance for help Regards Pavan +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +--- +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
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.