Page 1 of 1

submit a job using a cobol program and using CICS.

Posted: Fri Jul 08, 2016 12:18 pm
by Niketan
This is a question I could not fully answer. It had two parts.In first part, interviewer asked me if we can submit a job using COBOL program? And in second I was asked if we can do the same using CICS program too? 

The further question was, what is the way of doing these two?

For COBOL, I replied that we can execute a Job using the utility INTRDR. But I had nothad any idea about running a JCL from CICS. Can we do that, please tell me?

Re: submit a job using a cobol program and using CICS.

Posted: Fri Jul 08, 2016 3:18 pm
by Robert Sample
 For CICS, if a TD queue is defined pointing to the internal reader you can write JCL statements to it.

[ Post made via iPhone ] Image

Re: submit a job using a cobol program and using CICS.

Posted: Sat Jul 09, 2016 11:01 am
by Anuj Dhawan
Niketan wrote:For COBOL, I replied that we can execute a Job using the utility INTRDR. But I had nothad any idea about running a JCL from CICS. Can we do that, please tell me?
Just being nitpicky - INTRDR should not be called 'utility' ...or should it be?

Re: submit a job using a cobol program and using CICS.

Posted: Sat Jul 09, 2016 11:28 am
by Robert Sample
The z/OS JES Application Programming manual refers to it as a "logical device".  I don't think it can really be called a utility since utilities are executable programs and a logical device is not an executable program.

Re: submit a job using a cobol program and using CICS.

Posted: Sat Jul 09, 2016 11:42 am
by Anuj Dhawan
Thanks Robert. It's always fun to have you around! Appreciate your time! :)

Re: submit a job using a cobol program and using CICS.

Posted: Thu Jul 14, 2016 8:02 pm
by Niketan
Robert Sample wrote: For CICS, if a TD queue is defined pointing to the internal reader you can write JCL statements to it.

[ Post made via iPhone ] Image
Thanks Robert. Can TSQ also be used for the same purpose?

Re: submit a job using a cobol program and using CICS.

Posted: Thu Jul 14, 2016 8:03 pm
by Niketan
Anuj Dhawan wrote:
Niketan wrote:For COBOL, I replied that we can execute a Job using the utility INTRDR. But I had nothad any idea about running a JCL from CICS. Can we do that, please tell me?
Just being nitpicky - INTRDR should not be called 'utility' ...or should it be?
The z/OS JES Application Programming manual refers to it as a "logical device".  I don't think it can really be called a utility since utilities are executable programs and a logical device is not an executable program.
Thanks guys, have not thought it like that.

Re: submit a job using a cobol program and using CICS.

Posted: Thu Jul 14, 2016 8:28 pm
by Robert Sample
Can TSQ also be used for the same purpose?
No.  A temporary storage queue points to a location in memory -- either main memory or auxiliary memory.  A transient data queue points to a DD name that CICS manages; that DD name is usually DD SYSOUT=(A,INTRDR) to allow internal reader job submission from within CICS.  You could also use EXEC CICS SPOOLOPEN / EXEC CICS SPOOLWRITE / EXEC CICS SPOOLCLOSE to write directly to the JES spool, assuming you're using a reasonably recent version of CICS.

Re: submit a job using a cobol program and using CICS.

Posted: Mon Jul 18, 2016 12:42 pm
by Niketan
Robert Sample wrote:
Can TSQ also be used for the same purpose?
No.  A temporary storage queue points to a location in memory -- either main memory or auxiliary memory.  A transient data queue points to a DD name that CICS manages; that DD name is usually DD SYSOUT=(A,INTRDR) to allow internal reader job submission from within CICS.  You could also use EXEC CICS SPOOLOPEN / EXEC CICS SPOOLWRITE / EXEC CICS SPOOLCLOSE to write directly to the JES spool, assuming you're using a reasonably recent version of CICS.
Thanks for the explnation. It is really helpful.