Skip to main content

How to submite a job to JESControl via REST Endpoint

  • April 18, 2023
  • 1 reply
  • 1 view

I'm submitting a job via REST with the following endpoint with POST method

POST hostip:10086/.../jescontrol

with the foll. request body

{"ctlSubmit":"Submit","subJes":1,"xatSwitch":"c:\\pathtojcl\\test.jcl"}

I'm getting a response message in msgout - "Please enter a JCL file name to upload"  and in the messages array - JOB FLUSHED - MISSING JOB STATEMENT (JOBNUM=0001009). 08:52:45

In the web console JES Control, I look at the spool and the jobname is "??????"

How do I specify the jcl file name in the request body ?

 


#EnterpriseServer

1 reply

Kim Hoskin
Forum|alt.badge.img+2
  • Moderator
  • April 27, 2023

I'm submitting a job via REST with the following endpoint with POST method

POST hostip:10086/.../jescontrol

with the foll. request body

{"ctlSubmit":"Submit","subJes":1,"xatSwitch":"c:\\pathtojcl\\test.jcl"}

I'm getting a response message in msgout - "Please enter a JCL file name to upload"  and in the messages array - JOB FLUSHED - MISSING JOB STATEMENT (JOBNUM=0001009). 08:52:45

In the web console JES Control, I look at the spool and the jobname is "??????"

How do I specify the jcl file name in the request body ?

 


#EnterpriseServer

Hi Radhakrishnan, I suggest you review this KB https://portal.microfocus.com/s/article/KM000016825?language=en_US  for a guidance on how to use the jescontrol API, the important thing to note is to pass the entire job as one line/string, line endings are handled with \\n in the JCLIn parameter.