Job Names for Web Jobs

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
stevec
Posts: 14
Joined: Sat Aug 06, 2016 12:50 am

Job Names for Web Jobs

Post by stevec » Sat Aug 06, 2016 12:52 am

The web job names (on Iseries) are always lweb_job for all jobs. Is there a way to force these to be unique, or better yet allow me to specify the name?

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: Job Names for Web Jobs

Post by Stewart Marshall » Sat Aug 06, 2016 10:57 am

I'm happy to be proven wrong here, but I think you're stuck with the names that you're given.

Can you give us a little more detail as to the requirement please

Thanks
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

MarkD
Posts: 627
Joined: Wed Dec 02, 2015 9:56 am

Re: Job Names for Web Jobs

Post by MarkD » Tue Aug 09, 2016 8:26 am

Please see - https://www.ibm.com/support/knowledgece ... tchgjb.htm

It does not seem that you can change an IBM i job name once it has started.

stevec
Posts: 14
Joined: Sat Aug 06, 2016 12:50 am

Re: Job Names for Web Jobs

Post by stevec » Wed Aug 10, 2016 6:18 am

Yes I would like ability to specify the job name "before" the job is created. For longrange maybe in the system profile setup. For normal web jobs maybe a auto assign unique name feature.

We use alot of Iseries temporary members in transaction files for business logic processing prior to finalization. Problem with web jobs is they could be colliding.

MarkD
Posts: 627
Joined: Wed Dec 02, 2015 9:56 am

Re: Job Names for Web Jobs

Post by MarkD » Wed Aug 10, 2016 8:10 am

L4Web server jobs must be stateless. This means every time you send a request to the server it gets routed into a L4Web job. Most of the time your request get routed into the same L4Web job as the last request your sent, but sometimes your request will get routed into a different L4Web job. This means you cannot reliably keep any state in the L4Web job itself (eg: in the job name, or in something in QTEMP).

MarkD
Posts: 627
Joined: Wed Dec 02, 2015 9:56 am

Re: Job Names for Web Jobs

Post by MarkD » Wed Aug 10, 2016 8:15 am

This also means that you have to reestablish a L4Web job's required execution state on every single interaction.
The classic example of this is the job's library list.
If you change it on the first request you cannot be sure it will be the same on the next request.

stevec
Posts: 14
Joined: Sat Aug 06, 2016 12:50 am

Re: Job Names for Web Jobs

Post by stevec » Wed Aug 10, 2016 11:41 pm

That is not case with us - we set max job to 1 so they go away. This caused problems with files being in use so that a daily save process could not be done. ANd Lansa jobs on Iseries run in default activation group which makes things even worse.

Is there any way to make the lansa job names unique rather than duplicate?

stevec
Posts: 14
Joined: Sat Aug 06, 2016 12:50 am

Re: Job Names for Web Jobs

Post by stevec » Thu Aug 18, 2016 5:40 am

Anybody else from Lansa?

Need verification that I can or cannot specify the job name for web jobs.

If I am stuck with your hard coded "LWEB_JOB" for a name then I have alot of work to do ...

MarkD
Posts: 627
Joined: Wed Dec 02, 2015 9:56 am

Re: Job Names for Web Jobs

Post by MarkD » Thu Aug 18, 2016 8:07 am

I am pretty sure can not do that that in the current version.
You might be able to change the job name by changing a job description somewhere, but that would just be to another invariant constant name.
You could put in an enhancement request via product support.

The job number is no help because it is unique while the job is running I think?

stevec
Posts: 14
Joined: Sat Aug 06, 2016 12:50 am

Re: Job Names for Web Jobs

Post by stevec » Thu Aug 18, 2016 8:30 am

Actually that is a great idea Mark!.

Yes job number is unique, I can use that in my new logic I am building.

I would still prefer a slightly less unique method as discussing in the wam session thread. Web users can then reuse based on login info rather than always unique (job #)

MarkD
Posts: 627
Joined: Wed Dec 02, 2015 9:56 am

Re: Job Names for Web Jobs

Post by MarkD » Thu Aug 18, 2016 8:55 am

The complexity is that your WAM is not always assigned the same job - which you said you have accounted for.
However there is some other option I think where WAM jobs also get killed off after so many usages?
It's beyond my knowledge whether that is for the same session, or only for different sessions - but it could potentially mean a session suddenly gets a new job number assigned. Ideally you probably would be better to keep a session id to file member name conversion table.

Post Reply