| Q. I have been wondering, how does Online Mode of Processing work as opposed to Batch Mode? |
COBOL Programs generally process Data in Batch Mode(Offline Mode). In Batch mode - you must tell all the Inputs, Outputs at the very beginning, right at outset, even before the Program actually starts. On the buzzer, once you hit SUB(Submit) and give your job(task) to the Mainframe Computer for processing, there’s no turning back. The Mainframe Computer processes your data, according to its own convenience. It can take a long time for the program to generate outputs – you don’t have any clue. During this time, there is no interaction between the COBOL Program and the user. There is no manual intervention from the time, the COBOL Program begins to run, until it completes. Once the COBOL Program completes, it alerts you – notifies you, of the results. In other words, the COBOL Program is run Offline – it wouldn’t provide immediate outputs/results to the Inputs, you supply. So, in Batch mode, don’t expect a COBOL Program to give you immediate outputs/results to your Inputs, on the spur of the moment, on the go.
Contrast this, with running a COBOL Program in Online Mode. In Online(Interactive) mode, you give some input, the COBOL Program processes your Data Input, produces some output, then you type some more input, that the COBOL Program processes and you get some more output. This Input, Process, Output cycle continues, until you arrive at the final solution. In Online mode, the Program give immediate(quick) response or output, to the Inputs you supply, on the go, on the spur of the moment. You don’t have to wait too long in Online, unlike Batch Mode(Offline).
|
| Can you run a COBOL Program in an Online, Interactive Manner on a Mainframe Computer? What is CICS Software? |
CICS Software can be used to run COBOL Programs in an Online Interactive manner, on a Mainframe Computer. CICS stands for Customer Information Control System. CICS Software is a giant, robust Transaction Server. Let’s think about Flight Reservations. Zillions of people around the globe, who want to travel send their requests for Booking Tickets. It is CICS Software that handles, manages these requests, passes them on, and gets them processed using the correct COBOL Program, immediately, on-the-fly, and sends the Output Response back to the Client. CICS Software is robust server, that can humungous volumes, huge loads of Transactions at a time. IMS-DC and TPF are examples of some other Transaction Monitors on IBM Mainframes. Role of CICS Software : Bear in mind, that when you run a COBOL Program in online-mode, it runs under the supervision of CICS Software. So, a COBOL Program in Online Mode, directly doesn’t run on its own, stand-alone. It is the CICS Software that handles all the activities on behalf of the COBOL Program. Where does the COBOL Program come into picture : The entire Data Processing Logic(Business Rules) is written in the COBOL Program. CICS Server is just an intermediary, which delegates and passes on requests of folks to the COBOL Program for Processing. The actual data-processing is done by the COBOL Program. |
| Q. What are Transactions? How do you run COBOL Programs in CICS? What are CICS Tables? |
In Windows, you double-click a Program, to start it in the Online-Mode. However, in CICS, a user cannot directly start a Program. Instead, you define a Transaction, which in turn will run the COBOL Program in Online Mode. Every transaction has a 4-byte Unique identification number called Transaction ID. You wanna to run COBOL Programs in Online mode on CICS, transactions are the way. How do you run a COBOL Program on CICS? On a CICS Terminal(like a Web-browser), when you type the Transaction-ID, and hit ENTER, the COBOL Program is loaded, immediately started in the online-mode. This is called invoking the Transaction. For example, if the COBOL-online Program is BOOKTKT, and the Transaction-ID is TBOOK, when you type TBOOK, and hit ENTER, CICS Software will find the the COBOL Program BOOKTKT on the Disk, and Load into the CICS Region and execute it in Online Mode. Similar to TSO, CICS Software serves many users simultaneously. CICS is a very robust Transaction Monitor (keeps listening for transactions) – it can handle trillions of transactions at a time. When you invoke a transaction, by typing say TBOOK, it starts a COBOL Program like BOOKTKT. But how does the CICS Software, which COBOL Program to start for the transaction TBOOK? Moreover, the CICS Software also needs to know the place(location) to look for your COBOL Program. What is the PDS, Folder or library on the Disk in which the COBOL Load Module BOOKTKT resides, so that CICS Software can pick up the Load, and start running it. Now, all this extra-information is stored in CICS Tables. The important CICS Tables are : PCT – For Transactions PPT – For COBOL Programs FCT – For Files RCT – For DB2 Connections When you type the Transaction ID – TBOOK, on the Terminal, the CICS Software will look-up the Transaction in the PCT. | Transaction | Program | | TBOOK | BOOKTKT | | TABC | PROGR01 | | TDEF | PROG02 | | ... | ... | PCT Table(Program Control Table) tells the COBOL-CICS Program for any Transaction. | Program | Load Pointer | | BUA21 | AGY0157.CICS.LOADS | | BUA22 | AGY0157.CICS.LOADS | | BOOKTKT | AGY0157.DEMO.CICS.LOADLIB | | BUA23 | AGY0157.DEMO.CICS.LOADLIB | PPT Table(Process Program Table) tells the location(Load Library) from which the COBOL Program(Load) must be picked up, and loaded into the CICS Region. |
| Q. How do you add entries/remove entries from PCT and PPT, for your Transaction and COBOL Program? |
Just as you can write your own custom Transactions(Online COBOL Programs), IBM supplies some ready-made, pre-written transactions for doing some common day-to-day tasks. For example, you can use the Ready-made transaction CEDA, to add your Transaction’s entry into the CICS PCT Table. Such ready-made transactions supplied to you by IBM for doing routine tasks are called Utility Transactions. CEDA – CEDA is the ready-made Utility Transaction, to DEFINE(add) new entries in the CICS Tables. CEMT – CEMT is the ready-made Utility Transaction, to ENQUIRE(Search), or query the entries(rows) in CICS Tables. A second more important use of CEMT is to refresh the Load Pointer. Whenever you make changes(modifications) to a CICS Transaction(COBOL Online Program), you also need to reset(refresh) the Pointer in PCT Table, disconnect it from the Old Load, and point it to the new Load Module.
CECI – CECI is the ready-made Transaction, that stands for CICS Command Level Interpreter. Essentially, when you want to execute(run) and test some CICS Instructions, outside a COBOL Program(without writing a complete COBOL Program), you can use CECI ready-made transaction. For example, after designing CICS GUI Screens, when you want to test them, display the screens and see how they look, you would use the ready-made transaction CECI. |