CHGSPLFA on output

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
hbi
Profound User
Posts: 24
Joined: Sun Oct 30, 2011 1:04 pm
First Name: Helge
Last Name: Bichel
Company Name: Helge Bichel
Country: Denmark
Contact:

CHGSPLFA on output

Post by hbi »

I am doing update of some spollfile attr. after creation of the spoolfile.
This is done by:
DoCmdString = 'CHGSPLFA'
+ ' FILE(' + %trim(PRTFILNAM) + ')'
+ ' JOB(' + %editc(ZPGMJOBNBR:'X') + '/' + %trim(ZPGMUSRCUR)
+ '/' + %trim(ZPGMJOB)+ ')'
+ ' SPLNBR(' + %editc(PRTSPLNBR:'X') + ')';
DoCmdString += ' USRDFNDTA(' + q;
DoCmdString += 'here goes mu USRDFNDTA';
DoCmdString += q + ')';

An OVRPRTF has been executed before open of til spoolfile for setting formtype etc.

This work perfect when running in 5250 environment, but when running under PUI it fails.

Reason is the JOB (NBR,USER,JOB) retrieved from the SDS does not match the JOB(NBR,USER,JOB) on the spoolfile, so the above shown CMD returns
Job 318210/DKHEBID/PROFOUNDUI not found.

The PUI session is 318210/DKHEBID/PROFOUNDUI so the SDS is filled correct
but the actual spollfile has JOB 318178/DKHEBID/QPRTJOB

Looking at WRKSPLF:
File
File Nbr Job User Number
TDL001AP 1 QPADEV0003 DKHEBID 318146 <-- 5250 session
TDL001AP 13 QPRTJOB DKHEBID 318178 <--- PUI session

I don't know where the the Job Number 318178 comes from since no job
with 318178 exists, and it seeem the 318178 keeps alive between PUI sessions.

Any bid on this ?
Brgds
Helge
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: CHGSPLFA on output

Post by Brian »

Helge,

This is a common problem when using the web server. The following thread discusses now to remedy the situation.

http://profoundlogic.com/forums/phpbb3/ ... pool#p1721
hbi
Profound User
Posts: 24
Joined: Sun Oct 30, 2011 1:04 pm
First Name: Helge
Last Name: Bichel
Company Name: Helge Bichel
Country: Denmark
Contact:

Re: CHGSPLFA on output

Post by hbi »

Ok, tried SPLFOWN(*JOB) and SPLFOWN(*CURUSRPRF).
Result:
TDL001AP 7 PROFOUNDUI QTMHHTTP 318285 <---SPLFOWN(*JOB)
TDL001AP 21 QPRTJOB DKHEBID 318178 <---SPLFOWN(*CURUSRPRF)

should be:
TDL001AP 7 PROFOUNDUI DKHEBID 318285

so neither SPLFOWN works for being able to do a CHGSPLFA with
JOB info from the SDS.

Houston, we have a problem.
Brgds
Helge
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: CHGSPLFA on output

Post by David »

See my post here:

http://www.profoundlogic.com/forums/php ... f=53&t=782

Also read closely the IBM article referenced in that thread for an expanation on how the system assings spooled file job/user in an environment where the job start user and current user are different profiles.

This condition is in play when running a PUI session outside of Genie. In green-screen (or in Genie) the 2 user profiles are always the same, so this never comes up.

However, in this environment, the job start user profile is QTMHHTTP in all cases. The current user of the job is later set to whomever has signed in.

To locate a spooled file using SPLFOWN(*JOB), use the current job name and number from the SDS along with the job start user (QTMHHTTP). This is positions 254-263 in the SDS.

For most other purposes, you would want to use the current user profile (positions 358-367) as this is the "current" user profile.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest