CHGSPLFA on output
Posted: Wed Nov 16, 2011 6:59 am
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
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