Atrium Job LIBLs

Use this board to ask questions or have discussions with other Atrium users.
Post Reply
rrogulski
New User
Posts: 10
Joined: Fri Jan 20, 2012 2:29 pm
First Name: Rob
Last Name: Rogulski
Company Name: StoneRiver
Contact:

Atrium Job LIBLs

Post by rrogulski »

It is our understanding that the jobs started by Atrium should have the LIBL defined in instance/PUI0001204. We are using Ajax calls to retrieve data to update the screen. The calls are done immediately to render the screen appropriately. We are find that that sometimes the QTMHHTTP/instance jobs do not have this LIBL established and the Ajax calls are trying to run in them; therefore the call fails because it can't find the program in the LIBL. Again, this only happens occasionally. Is this something that has been seen before? Is there something that would keep the LIBL from being set appropriately?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Atrium Job LIBLs

Post by Scott Klement »

The library list in PUI0001204 only applies when launching a Rich Display. When you launch a Genie Macro, PUI0001204 does not apply, but instead the standard 5250 method of assigning library list is used. Web/PC applications do not have any concept of library list. So it is just Rich Display that uses PUI0001204.

When you say you use AJAX calls, are you referring to the AJAX calls that we have coded inside Profound UI? Or are you coding your own AJAX calls? Nothing related to the library list should be set up automatically if you are making your own AJAX calls -- setting that up is your responsibility in that case. We do provide a SyncJob() API that can be used to syncrhonize your AJAX program's library list with the Rich Display or Genie session that it was launched from, but this doesn't "just work automatically" it requires a little bit of code on both the client and server sides...

Can you provide more information about how you're implementing these AJAX calls?
rrogulski
New User
Posts: 10
Joined: Fri Jan 20, 2012 2:29 pm
First Name: Rob
Last Name: Rogulski
Company Name: StoneRiver
Contact:

Re: Atrium Job LIBLs

Post by rrogulski »

We are using Rich Display, not Genie.

We have javascript that makes AJAX calls to return JSON information so that information can be presented based on that information. Our AJAX calls use a service program that is supposed to set the LIBL based on the calling program's job. This program is in the CGI library specified within the configuration. The issue comes in that the service program can not be found.

It seems that when the issue occurs (rare), the AJAX call is being processed under the QTMHHTTP user, when it seems like it should be running under current user in one of the jobs processing 'function' PGM-QZSRCGI.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Atrium Job LIBLs

Post by Scott Klement »

Unless you've coded this into your Apache configuration, the AJAX programs will need code in them to set the library list and/or userid that they should be running under.

We have an API called SyncJob() that your programs can call to synchronize the userid and library list with the Rich Display or Genie session that they were called from if you pass the AUTH=xxxx variable from the main session to your AJAX programs.

Otherwise, you can set it up your own way by telling Apache to use the userid supplied via basic authentication and you can set the library list with an environment variable. There's nothing specific to Atrium in the Apache config, it's just standard IBM i CGI stuff.

Were you planning to use one of these methods? If so, let me know and I can provide more details.

With regard to your service program, do you have it bound with the default of *IMMED activation, or are you using the *DEFER activation feature? If you are using *IMMED, then the service program is activated when the calling program is activated -- which means that the library list must be set up to find the service program before your program that calls it is activated. With *DEFER it's possible for the calling program to set up the library list itself before using the service program. (That's just the way ILE works... nothing to do with Atrium or PUI)

Let me know if you have more questions...
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests