Purpose: to learn how to write CICS COBOL programs to browse an indexed file by alternate keys.
1) Prepare or modify the map used in problem 10. The map
should Include function keys that will get the first record in the file
(top), browse forward, browse backward, or get to the last record in the
Use your XYY3M mapset name, where X = your class letter
and YY = your account number.
2) Assemble the map using appropriate JCL -- modify MAPJOB in your CNTL.
3) Write a COBOL program including appropriate CICS commands that will get the top or the first record in the file, browse forward, browse backward, and get to the bottom or the last record in the file. Use your CCPXYY3 transaction X = your class letter and YY your class number.
4) Compile the COBOL program using appropriate JCL -- modify PGMJOB in your CNTL.
NOTE: If you are using the example in the Orange manual or the CICS text, duplicate alternate keys will most likely cause browse to "lock" (not be able to go forward or backward). There are ways around this, but it is not required. The easiest solution is to make all your alternate keys unique (different names). Remeber the alternate key file name that you use in this program is CCPD##1P (not CCPD##1F). Unfortunately, using CCPXYY1P in SMS5 will not work or does not work well. The SMS5 transaction is strictly to show what records are in your file by primary key - use CCPD##Y1F in SMS5.
Grading: e-mail me who the following message:
Program and 11 ready--submit D##3 in CICS.
Extra 2 points--do a wraparound (last record going to first record when browsing forward)
THOROUGHLY TEST YOUR PROGRAM BEFORE SENDING E-MAIL!!
- 2 points each time a test by me fails.