Java job.getJobDate() Results different from machine to machine.. - IBM AS400
This is a discussion on Java job.getJobDate() Results different from machine to machine.. - IBM AS400 ; Hello,
I am trying to figure out why I can get this test program to display
the correct jobdate on my Test Machine but not on my production
machine.
I do the following on Both Machines.
CHGJOB DATE(04152008)
Then I ...
-
Java job.getJobDate() Results different from machine to machine..
Hello,
I am trying to figure out why I can get this test program to display
the correct jobdate on my Test Machine but not on my production
machine.
I do the following on Both Machines.
CHGJOB DATE(04152008)
Then I go to QSHELL and run my program.
I get two different results.
Development:
System.out.println(job.getJobDate()); Yields:
Tue Apr 15 00:00:00 CDT 2008
Production:
System.out.println(job.getJobDate()); Yields:
Thu May 01 00:00:00 CDT 2008
Thanks,
Jeff
This is my test Class:
public class Test
{
public static void main(String[] args)
{
Calendar jobDate = Calendar.getInstance();
AS400 iSeries = new AS400();
Job job = new Job(iSeries);
try
{
job.getJobDate();
System.out.println(job.getJobDate());
}
catch (Exception e)
{
e.printStackTrace();
}
iSeries.disconnectAllServices();
System.exit(0);
}
}
-
Re: Java job.getJobDate() Results different from machine to machine..
On May 1, 6:00*pm, slink...@gmail.com wrote:
> Hello,
>
> I am trying to figure out why I can get this test program to display
> the correct jobdate on my Test Machine but not on my production
> machine.
>
> I do the following on Both Machines.
> CHGJOB DATE(04152008)
>
> Then I go to QSHELL and run my program.
> I get two different results.
>
> Development:
> System.out.println(job.getJobDate()); Yields:
> Tue Apr 15 00:00:00 CDT 2008
>
> Production:
> System.out.println(job.getJobDate()); Yields:
> Thu May 01 00:00:00 CDT 2008
>
> Thanks,
> Jeff
>
> This is my test Class:
>
> public class Test
> {
> * * * * public static void main(String[] args)
> * * * * {
> * * * * * * * * Calendar jobDate = Calendar.getInstance();
> * * * * * * * * AS400 iSeries = new AS400();
>
> * * * * * * * * Job job = new Job(iSeries);
> * * * * * * * * try
> * * * * * * * * {
> * * * * * * * * * * * * job.getJobDate();
> * * * * * * * * * * * * System.out.println(job.getJobDate());
> * * * * * * * * }
> * * * * * * * * catch (Exception e)
> * * * * * * * * {
> * * * * * * * * * * * * e.printStackTrace();
> * * * * * * * * }
>
> * * * * * * * * iSeries.disconnectAllServices();
> * * * * * * * * System.exit(0);
> * * * * }
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -
Disregard the Calendar jobDate = Calendar.getInstance(); line.
-
Re: Java job.getJobDate() Results different from machine to machine..
slinkeey@gmail.com wrote:
> On May 1, 6:00 pm, slink...@gmail.com wrote:
>
>>Hello,
>>
>>I am trying to figure out why I can get this test program to display
>>the correct jobdate on my Test Machine but not on my production
>>machine.
>>
>>I do the following on Both Machines.
>>CHGJOB DATE(04152008)
>>
>>Then I go to QSHELL and run my program.
>>I get two different results.
>>
>>Development:
>>System.out.println(job.getJobDate()); Yields:
>>Tue Apr 15 00:00:00 CDT 2008
>>
>>Production:
>>System.out.println(job.getJobDate()); Yields:
>>Thu May 01 00:00:00 CDT 2008
>>
>>Thanks,
>>Jeff
>>
>>This is my test Class:
>>
>>public class Test
>>{
>> public static void main(String[] args)
>> {
>> Calendar jobDate = Calendar.getInstance();
>> AS400 iSeries = new AS400();
>>
>> Job job = new Job(iSeries);
>> try
>> {
>> job.getJobDate();
>> System.out.println(job.getJobDate());
>> }
>> catch (Exception e)
>> {
>> e.printStackTrace();
>> }
>>
>> iSeries.disconnectAllServices();
>> System.exit(0);
>> }
>>
>>
>>
>>}- Hide quoted text -
>>
>>- Show quoted text -
>
>
> Disregard the Calendar jobDate = Calendar.getInstance(); line.
Looks like on the test machine you had the authority to set the date and
perhaps on the production machine the CHGJOB didn't work and you don't
have the authority to make such a change?
--
Rodney A Johnson
Working on a new project. Former technical team Lead for i5/OS (AS/400)
Spool
Dept 33A
IBM Rochester, Minnesota
The contents of this message express only the sender's opinion.
This message does not necessarily reflect the policy or views of
my employer, IBM. All responsibility for the statements
made in this Usenet posting resides solely and completely with the
sender.
-
Re: Java job.getJobDate() Results different from machine to machine..
On May 2, 10:51*am, "Rodney A. Johnson" wrote:
> slink...@gmail.com wrote:
> > On May 1, 6:00 pm, slink...@gmail.com wrote:
>
> >>Hello,
>
> >>I am trying to figure out why I can get this test program to display
> >>the correct jobdate on my Test Machine but not on my production
> >>machine.
>
> >>I do the following on Both Machines.
> >>CHGJOB DATE(04152008)
>
> >>Then I go to QSHELL and run my program.
> >>I get two different results.
>
> >>Development:
> >>System.out.println(job.getJobDate()); Yields:
> >>Tue Apr 15 00:00:00 CDT 2008
>
> >>Production:
> >>System.out.println(job.getJobDate()); Yields:
> >>Thu May 01 00:00:00 CDT 2008
>
> >>Thanks,
> >>Jeff
>
> >>This is my test Class:
>
> >>public class Test
> >>{
> >> * * * *public static void main(String[] args)
> >> * * * *{
> >> * * * * * * * *Calendar jobDate = Calendar.getInstance();
> >> * * * * * * * *AS400 iSeries = new AS400();
>
> >> * * * * * * * *Job job = new Job(iSeries);
> >> * * * * * * * *try
> >> * * * * * * * *{
> >> * * * * * * * * * * * *job.getJobDate();
> >> * * * * * * * * * * * *System.out.println(job.getJobDate());
> >> * * * * * * * *}
> >> * * * * * * * *catch (Exception e)
> >> * * * * * * * *{
> >> * * * * * * * * * * * *e.printStackTrace();
> >> * * * * * * * *}
>
> >> * * * * * * * *iSeries.disconnectAllServices();
> >> * * * * * * * *System.exit(0);
> >> * * * *}
>
> >>}- Hide quoted text -
>
> >>- Show quoted text -
>
> > Disregard the Calendar jobDate = Calendar.getInstance(); line.
>
> Looks like on the test machine you had the authority to set the date and
> perhaps on the production machine the CHGJOB didn't work and you don't
> have the authority to make such a change?
>
> --
> Rodney A Johnson
> Working on a new project. *Former technical team Lead for i5/OS (AS/400)
> Spool
> Dept 33A
> IBM * Rochester, Minnesota
>
> The contents of this message express only the sender's opinion.
> This message does not necessarily reflect the policy or views of
> my employer, IBM. *All responsibility for the statements
> made in this Usenet posting resides solely and completely with the
> sender.- Hide quoted text -
>
> - Show quoted text -
Rodney,
I do not beleive that is the case. I put the job on hold and looked
it the job attributes and it actually had the correct job date that I
set using CHGJOB.
I called 1-800-IBM-SERV and talked to tech that explained to me that
he was suprised that job.getJobDate() was able to retrieve the job
date that I set using CHGJOB on my Development Box considering
job.getJobDate()); was never meant for native job's. I stated that I
was hoping that it would inherit the atributes from the parent job. He
told me that does not hold true in java like I was expecting it would
like what happens when you submit a job and it inherits your session
job attributes.
My java program called with a CL so I just use the following...
RTVJOBA DATE(&JOBDATE)
....then pass it to my java program as a parm.
Thank you for your reply
Jeff