Cics programs pdf




















In case, IC is specified more than once, the cursor is placed in the last field. FSET - Field set. MDT is set on so that the field data is to be sent from the terminal to the host computer regardless of whether the field is actually modified by the user.

BMS receives the data entered by the user and then formats it into a symbolic map area. The application program has access only to the data present in the symbolic map. The application program processes the data and the output is sent to the symbolic map. BMS will merge the output of the symbolic data with the physical map.

Physical Map is a load module in the load library which contains information about how the map should be displayed. A Symbolic Map is a Copy book in the library. It has all the named fields.

The application programmer uses these fields to read and write data into the map. For an unprotected named field, in a map, if we have specified a length of 10, this means that the name field can take values whose length cannot exceed But when you display this map using CICS and start entering values for this field on the screen, we can enter more than 10 Characters, i. To prevent this, we use Skipper field or stopper field.

A Skipper field would generally be an Unnamed field of length 1, specified after a named field. If we place a skipper field after the named unprotected field, then while entering the value, once the specified length is reached, the cursor will automatically position to the next unprotected field. If we place a stopper field after the named unprotected field, then while entering the value, once the specified length is reached, the cursor will stop its positioning.

The attribute byte of any field stores information about the physical properties of the field. The following diagram and the table explain the significance of each bit.

MDT is a flag which holds a single bit. It specifies whether the value is to be transferred to the system or not. The send map command writes formatted output to the terminal. It is used to send the map to the terminal from the application program. The following table lists the parameters used in a send map command along with their significance. It is the name of the map set that contains the mapname.

The mapset name is needed unless it is the same as the map name. It means that no data from your program is to be merged into the map and only the information in the map is transmitted. We use it to modify the variable data in a display that has already been created.

Only the data from your program is sent to the screen. The constants in the map are not sent. Flag Reset turns off the modified data tag in the attribute byte for all the fields on the screen before what you are sending is placed there. It can be used to position the cursor on the terminal screen.

Cursor can be set by moving -1 to the L part of the field and then sending the map. It causes the printer to restore the paper to the top of the next page before the output is printed. Any application program would require an interface to interact with the CICS. EIB contains the information required during the execution of a program.

If we code these COBOL verbs, it will not give any compilation error, but we may get unpredictable results. The EIB is unique to a task and it exists for the duration of the task.

It contains a set of system related information corresponding to the task. It contains information about transaction identifier, time, date, etc. While executing non-conversational programs, no human intervention is required. All the necessary inputs are provided when the program is started.

They are similar to batch programs that run in the batch mode. So in CICS, they are rarely developed. Sending a message to the terminal and receiving a response from the user is called a conversation.

The time taken by user to respond is known as Think Time. This time is considerably high, which is a major drawback of Conversational programs. As of now, we have covered non-conversion and conversion programs. Conversion programs have a major drawback as their think time is considerably high. To overcome this problem, pseudo-conversion programming came into the picture. We will now discuss more about pseudo-conversion programs.

So we can utilize the resources in a pseudo-conversion program till the user gives the input. When the input is received, it is processed and the output is displayed. The important point to note in pseudo-conversation is passing of data between every task.

We will discuss about the techniques for passing data. It is used to pass data from one program to another program. The programs can exist in the same transaction or in different transaction also. After sending the map, the task ends and waits for the user response.

At this stage, the data needs to be saved, because though the task has ended, the transaction has not. When this transaction is to be resumed, it would require the prior status of the task. User enters the input. The resources are best utilized. Resources are released as soon as the program is suspended temporarily. When the following unconditional return statement is issued, the task and the transaction program is terminated.

When the following conditional return, i. The next transaction starts when the user presses an AID key. EIBAID is one byte long and holds the actual attention identifier value used in the input stream. One way is to specify the screen position relative to line and column number in the CURSOR option on the send map command. Other way is to move -1 to the symbolic map variable suffixed with L.

While sending a map, if we want to have different attributes for a field other than that is specified in the map, then we can override that by setting the field in the program.

It is provided by CICS. The attribute required can be chosen from the list and moved to the symbolic field variable suffixed with 'A'. CICS allows us to access file data in many ways. Most file accesses are random in online system as the transactions to be processed are not batched and sorted into any kind of order. It also allows us to access data using database managers.

There are many types of abends and errors which one can face while using a CICS application. Errors can arise due to both hardware of software issues. We will be discussing about errors and error handling in this module. For example, if we are reading a particular record and the record is not found, then we get the "Not Found" error. Mapfail is a similar error. Errors in this category are handled by explicit logic in the program.

Logical errors arise due to some reasons like division by zero, illegal character in numeric field, or transaction id error. Errors that are related to hardware or other system conditions are beyond the control of an application program. CICS provides several mechanisms to identify the errors and to handle them in our programs.

Handle condition is used to transfer the control of the program to a paragraph or a procedure label. If a program abends due to some reasons like input-output error, then it can be handled using Handle Abend CICS command. Ignore condition is used when we want no action to be taken if a particular abend or error happens which is mentioned inside the Ignore Condition. All the application programs must have an entry in the Processing Program Table.

The application programs which execute under CICS have various logical levels. The first program which receives the control directly is at highest logical level, i.

In this field of technical jargon, Doug Lowe is indeed a refreshing experience". Teaches you the advanced CICS elements you'll use regularly and shows you when to use them.

Annotation copyrighted by Book News, Inc. This book takes up where Part 1 leaves off. Part 1 covers the basics of CICS In other words, the program is being executed for the first time in a pseudo-conversational session. You can use it to determine the processing the user has requested. The first part of this member is shown in figure It gives a name to each of the values that represents an AID key.

The definition of this area is inserted into the Linkage Section of the program when the program is prepared for execution. You can use the value of this field to determine the processing the user has requested.

In the Working-Storage Section, you can see the one switch and the one flag used by this program. The three conditions that are defined for the flag will be used to determine which options are coded in the SEND MAP command when the customer map is sent to the screen. The next field is for data related to the communication area. To use the communication area, you need to provide two definitions for it in your program: one in the Working-Storage Section and one in the Linkage Section.

The program can then use this information to determine the processing to be done. In the inquiry program, the communication area is a one-byte field, but a more complicated program may require many fields.

After the response-code field, you can see the record description for the customer master records that are read by this program. This description is followed by two Copy statements. Before I go on, I want to point out that each time a program is executed, a fresh copy of working storage is obtained.

If you need to preserve data from one program execution to the next, you can store it in the communication area. It contains the logic required to implement the pseudo-conversational design. If the length is zero, it means that no data was passed to the program, which indicates that there was no previous execution of the program. As a result, procedure is performed to send the customer map to the screen. But first, the program initializes the map by moving Low-Value to the output area, it sets the TRANIDO field in the symbolic map to INQ1 so the correct trans-id is displayed, and it sets Send-Erase to True so procedure will know to clear the screen before displaying the map.

That reduces network use and improves overall system performance. Then, the Continue statement causes program execution to continue with the first statement after the Evaluate statement.

If none of these conditions are true, the When Other clause performs procedure to display an error message that indicates that an invalid key was pressed. This procedure performs procedure to get the customer number the user entered on the screen and procedure to edit the number. If the number is valid, procedure performs procedure to retrieve the requested record from the customer master file.

Then, if the record is retrieved indicat- ing that the customer number is still valid , the program displays the customer data by performing procedure with Send-Dataonly set to True. The only editing requirement for this program is that the user must enter a customer number. Procedure does this editing by checking the length and input fields of the customer number in the symbolic map.

If either of these error conditions is true, procedure turns the valid-data switch off so procedure can determine what processing it should do next. The code that follows the READ command tests the value of the response- code field. If the command completed normally, the program moves data from the customer record to the corresponding fields in the output map. Unless procedure terminates the program, procedure continues by performing procedure to issue the appropriate SEND MAP command.

Notice that all three commands specify the same mapset, map, and source of the data to be sent to the screen the output area of the symbolic map.

That happens when the program is started for the first time or when the user presses the Clear key. This command includes the ERASE option, which causes the screen to be erased before the map is displayed. As a result, the screen will look like the first one in figure That happens when the user enters a valid customer number.

That means that only the data in the symbolic map is sent to the terminal, because the literals that make up the headings, captions, and instructions are already there from the previous execution of the program. This improves the performance of the program. That happens when the user presses an invalid key or enters an invalid customer number.

To make sure that you have a good grasp of what these commands do and how you should code them, the next three figures summarize them. As a result, you need to identify the mapset and map on the command. You also need to use the FROM option to specify the name of the data area in the symbolic map that contains the data to be sent to the terminal. If you code just those options, the data in the symbolic map is combined with the data in the physical map, and both are sent to the screen.

In the second case, only the data in the symbolic map is sent. But this time, you use the INTO option to provide the name of the data area in the symbolic map that will receive the data. FROM Specifies the name of the area in the symbolic map that contains the data to be mapped. If neither option is specified, both the constant data in the physical map and the data in the FROM area are sent.

INTO Specifies the name of the data area where the mapped data should be placed. This command can be used to read data from all three types of VSAM files: key-sequenced in- dexed , entry-sequenced sequential , and relative record files. Most of the time, though, this command is used to read key-sequenced files on a random basis. The three options that it requires provide the name of the file, the name of the data area where the data should be placed when a record is read, and the name of the field that contains the key of the record to be read.

To determine whether the read operation is successful, you can also code the RESP option with this command. You can then test this code to see whether the read operation was successful or whether an exceptional condition occurred.

The response codes that CICS returns will vary according to the function of the command. INTO Specifies the name of the data area where the input record is placed. Although this command is usually used with key-sequenced indexed files, it can also be used with entry- sequenced sequential and relative record files. The response code it returns indicates whether the operation was successful or whether an exceptional condition occurred. Within the parentheses, you code the name of the condition that you want to test.

When the RETURN command is issued in this form, the program associ- ated with the trans-id will be started the next time the user presses an attention key. A command like this is often used when the user presses an AID key to exit from a program.

This command ends the program abnormally called an abend and displays a message at the terminal. Then, before starting another transaction, the user must press the Clear key to clear the screen. By default, this command also causes a storage dump to be produced, but you can eliminate that by coding the NODUMP option. In step 1, you get the specifications for the program.

This just means that you get the complete details about what the program is supposed to do. When you complete the two steps of the analysis and design phase, you can continue with the implementation phase. In this phase, you start by preparing the BMS mapset for the maps that will be used by the program step 3. Then, you code the program step 4. The main purpose of this book, of course, is to teach you how to do that. When the program is ready to test, you prepare it for execution by translat- ing, compiling, and link-editing it step 5.

After you prepare the program, but before you execute it, you must make sure that all of the CICS table entries required to support the program are in place step 6. If the pro- gram uses any files, appropriate entries are required in the FCT. If the program uses other CICS facilities, additional table entries may be required. In this step, you make sure that the program performs accord- ing to the program specifications. Although our eight-step procedure for developing CICS programs separates coding and testing into two distinct steps, we recommend that you code and test in phases.

Develop a complete set of program specifications. Implementation 3. Prepare the BMS mapset. Code the program.



0コメント

  • 1000 / 1000