using JCL in cobol

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
ssamanth777
Member
Posts: 2
Joined: Sun Oct 21, 2012 11:14 am
Location: bangalore

using JCL in cobol

Post by ssamanth777 » Sun Oct 21, 2012 11:25 am

hello everyone. this is my first post ever....... hope i get my answer asap.

I WANTED TO KNOW THE METHOD OF RUNNING A JCL PROGRAM FROM COBOL. EXPLAINATION WITH A SIMPLE EXAMPLE WOULD BE PERFECT. I SEARCHED ALL OVER THE INTERNET BUT COULDNT FIND A SIMPLE, DIRECT SOLUTION......

THIS QSTION WAS ASKED IN MY CLASS QUIZ.... AND I HAVE BEEN GIVEN 1 DAY TIME TO FIND THE ANSWER.....
samanth

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sun Oct 21, 2012 12:30 pm

Tough to give a usable answer asap, when the question is quite unclear. . .

Fiirst - there is no such thing as a "JCL Program". When a batch COBOL program (rather than an online program) is executed it is invoked by JCL - but only after it has been compiled/linked.

If you clarify what you really mean, someone will probably have a suggestion.

Yes, i suspect looking for the answer on the internet would be quite frustrating as i expect no useful topics are there.

PS. it is 2:30 am at my desk and i'm not sure how much longer i'll be tonight.
Have a good one

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Sun Oct 21, 2012 12:42 pm

As has been said, unclear.

From a Cobol program you can read a file and write a file.

In the JCL that executes the program, you can have as your input "some JCL" and have as your output the "Internal Reader".

The JCL which was read should then be submitted.

Is that it?

ssamanth777
Member
Posts: 2
Joined: Sun Oct 21, 2012 11:14 am
Location: bangalore

Post by ssamanth777 » Sun Oct 21, 2012 1:18 pm

dikdude and collins .... thnx for your interest in replying to my qstion.... though it is unclear.... now i get it.... weshould use move " //step1.... " statement to transfer the jcl lines into a file and then submit that file.... god its so obvious and simple..... i should have thought abt it.
anyways thnx i would be posting new dubts later.... get ready to answr them...lol
samanth

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sun Oct 21, 2012 1:19 pm

Hi WC,

My current guess is the the question is "How to run a COBOL program using JCL", but i'm not at all sure. . .

Anyway, it is 3:15+ and i'm outta here for a while :)

d

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Sun Oct 21, 2012 4:29 pm

I suspect it is "How do I submit a batch job from a COBOL program?" So 2 different interpretations. Also, why is thw question being double SHOUTED (asked in bold as well as in all upper case)? Also, we do not do asap - we do as and when we feel like it. If that is 'asap' then be prepared for 'asap' to be quite some time in the future maybe days or even weeks in extreme cases.

If the interpretation is as I think then William Collins has given you the gist of the method.
Last edited by NicC on Mon Oct 22, 2012 12:02 am, edited 1 time in total.
Regards
Nic

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sun Oct 21, 2012 8:31 pm

Hi Nic,

My "guess" was posted before the clarification fro samanth.

Hopefully, progress has been made and samanth will be back where there is more . . .
Have a good one

User avatar
Krishna
Site Admin
Posts: 1052
Joined: Fri Jan 27, 2006 7:50 am

Post by Krishna » Tue Nov 27, 2012 11:48 am

ssamanth,

Please find the answer at
http://www.mainframegurukul.com/ibmmain ... ost37.html

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others