Running Scripts within Platform Server Started Task
Apart from scheduling scripts requests in an address space separate from the platform server address space, you can also schedule a script request in the platform server address space.
Typically scripts are executed in an address space separate from the platform server address space. You submit a job, and the job executes the script. The script job can then submit file transfer requests to the platform server to process, and gets the response from the platform server. When the script terminates, the job also terminates. Besides, you can also schedule a script request in the platform server address space. When a request is scheduled in the platform server address space, the batch job that schedules the request typically terminates when the script is scheduled. The script itself is executed within the platform server address space.
//FUSJOB JOB ,CLASS=A,MSGCLASS=X //OSIUB000 EXEC PGM=OSIUB000,PARM='SERVER=FUSION' //STEPLIB DD DISP=SHR,DSN=FUSION.LOADLIB //SYSPRINT DD SYSOUT=* //SYSIN DD * PROCESS,RUNSCRPT,TRANSFER,SCRIPT SCRIPT="MY.SCRIPT.LIB(SCRIPT)" //
The JCL schedules the script in MY.SCRIPT.LIB(SCRIPT1) in the platform server started task called FUSION. The file transfer requests also run in the FUSION started task.
You can run the script in one platform server started task, and the file transfers in another started task. Use the SERVER parameter to define the platform server started task that will run the file transfers.
//FUSJOB JOB ,CLASS=A,MSGCLASS=X //OSIUB000 EXEC PGM=OSIUB000,PARM='SERVER=FUSION' //STEPLIB DD DISP=SHR,DSN=FUSION.LOADLIB //SYSPRINT DD SYSOUT=* //SYSIN DD * PROCESS,RUNSCRPT,TRANSFER,SCRIPT SCRIPT="MY.SCRIPT.LIB(SCRIPT1),SERVER=FUSION1" //
//FUSJOB JOB ,CLASS=A,MSGCLASS=X //OSIUB000 EXEC PGM=OSIUB000,PARM='SERVER=FUSION' //STEPLIB DD DISP=SHR,DSN=FUSION.LOADLIB //SYSPRINT DD SYSOUT=* //SYSIN DD * PROCESS,RUNSCRPT,TRANSFER, SCRIPT="MY.SCRIPT.LIB(SCRIPT1),SERVER=FUSION1,%LDSN=MY.DSN" //
In this example, the JCL creates a symbolic parameter called %LDSN, and assigns the value of MY.DSN to it. This information is passed to the script when the script executes.