I believe some of the programs are PASE based if I recall correctly and that means multi-threaded.
So you have to have a subsystem capable of running multiple jobs active I'm thinking before creating a spool file as PDF.
You could create the spool file as a regular spool file and then do a CPYSPLF to PDF after subsystems are started.
Regards,
Richard Schoen
Web:
http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
------------------------------
message: 6
date: Tue, 20 Feb 2024 22:40:26 -0500
from: Glenn Gundermann <glenn.gundermann@xxxxxxxxx>
subject: Create PDF using Transform Services does not work in
restricted state
Hi folks,
We're on 7.4 with the latest PTFs.
I have a batch backup program running in QCTL that ends all subsystems, does a full system backup, restarts all subsystems, DSPJOBLOG to PDF and emails the PDF. This works fine.
I want to add a feature. After the backup is complete and before restarting all subsystems, I want to check a dataarea and determine if I have set it to perform an IPL. If yes, I want to perform an IPL. But before the IPL, I want to generate the joblog PDF and email it.
Unfortunately, since the system is in a restricted state, I get the following error message:
OVRPRTF FILE(QPJOBLOG) DEVTYPE(*AFPDS) TOSTMF('/tmp/DEVS2K backup joblog
2024-02-19 18.51.27.pdf') WSCST(*PDF) OVRSCOPE(*JOB)
DSPJOBLOG JOB(*) OUTPUT(*PRINT)
CPFCE02 - Unable to access the required transform service.
What's the minimum I need to start to get Transform Services to work?
After the backup is complete, I'm thinking I would do this:
DCL VAR(&QSTRUPPGM) TYPE(*CHAR) LEN(20)
DCL VAR(&STRUPPGM) TYPE(*CHAR) STG(*DEFINED) +
LEN(10) DEFVAR(&QSTRUPPGM 1)
DCL VAR(&STRUPLIB) TYPE(*CHAR) STG(*DEFINED) +
LEN(10) DEFVAR(&QSTRUPPGM 11)
===================
If performing an IPL:
===================
RTVSYSVAL SYSVAL(QSTRUPPGM) RTNVAR(&QSTRUPPGM) CHGSYSVAL SYSVAL(QSTRUPPGM) VALUE(*NONE) STRSBS QCTL start whatever else is needed for Transform Services.
dspjoblog to pdf and email pdf
CHGSYSVAL SYSVAL(QSTRUPPGM) VALUE(&STRUPLIB/&STRUPPGM) PWRDWNSYS OPTION(*IMMED) RESTART(*YES)
===================
If not performing an IPL:
===================
STRSBS QCTL
dspjoblog to pdf and email pdf
Yours truly,
Glenn Gundermann
Email: glenn.gundermann@xxxxxxxxx
Cell: (416) 317-3144
As an Amazon Associate we earn from qualifying purchases.