submit a job using a cobol program and using CICS.

All sort of Mainframes Interview Questions.
Post Reply
Niketan
Registered Member
Posts: 20
Joined: Mon Aug 19, 2013 4:07 pm

submit a job using a cobol program and using CICS.

Post 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?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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
User avatar
Anuj Dhawan
Founder
Posts: 2801
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

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

Post 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?
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
User avatar
Anuj Dhawan
Founder
Posts: 2801
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

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

Post by Anuj Dhawan »

Thanks Robert. It's always fun to have you around! Appreciate your time! :)
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Niketan
Registered Member
Posts: 20
Joined: Mon Aug 19, 2013 4:07 pm

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

Post 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?
Niketan
Registered Member
Posts: 20
Joined: Mon Aug 19, 2013 4:07 pm

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

Post 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.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
Niketan
Registered Member
Posts: 20
Joined: Mon Aug 19, 2013 4:07 pm

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

Post 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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”