home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR21 / DOCPRC13.ZIP / SAMP-DOC.ZIP / COBOL.DOC < prev    next >
Text File  |  1993-01-19  |  42KB  |  547 lines

  1.                                                                                 
  2.                                                                                 
  3.                                                                                 
  4.                                                                                 
  5.                                                                                 
  6.                                                                                 
  7.                                                                                 
  8.                                                                                 
  9.                                                                                 
  10.                                                                                 
  11.                                                                                 
  12.                                                                                 
  13.                                                                                 
  14.                    *******************************************                  
  15.                    *                                         *                  
  16.                    *          A STUDENT APPROACH TO          *                  
  17.                    * COBOL ON AN IBM MVS/XA OPERATING SYSTEM *                  
  18.                    *                                         *                  
  19.                    *******************************************                  
  20.                                                                                 
  21.                                                                                 
  22.                                                                                 
  23.                                                                                 
  24.                                                                                 
  25.                                                                                 
  26.                                                                                 
  27.                                                                                 
  28.                                                                                 
  29.                                                                                 
  30.                                                                                 
  31.                                                                                 
  32.                                                                                 
  33.                                                                                 
  34.                                                                                 
  35.                                                                                 
  36.                                                                                 
  37.                                                                                 
  38.                                                                                 
  39.                                                                                 
  40.                                                                                 
  41.                                                                                 
  42.                                                                                 
  43.                                                                                 
  44.                                                                                 
  45.                                                                                 
  46.                                                                                 
  47.                                                                                 
  48.                                                                                 
  49.                                                                                 
  50.                                                                                 
  51.                                                                                 
  52.                                                     John S. Ward                
  53.                                                         4/10/93
  54.  
  55.  
  56. EJECT                                                                           
  57.         In this handout we follow step-by-step instructions in creating         
  58.    a COBOL program.  Job Control Language (JCL) is used to demonstrate
  59.    file linkage as well as program execution.  For the purpose of this
  60.    handout, we assume you have successfully accessed the ISPF/PDF               
  61.    PRIMARY OPTION MENU shown below:                                             
  62.                                                                                 
  63.                 GEORGIA STATE UNIVERSITY COMPUTER CENTER                        
  64.     --------------------ISPF/PDF PRIMARY OPTION MENU-----------------------     
  65.    OPTION ===>                                                                  
  66.                                                            USER ID  -userid     
  67.     0  ISPF PARAMS -Specify terminal and user parameters   TIME     -14:42      
  68.     1  BROWSE      -Display source data or output listing  TERMINAL -3278       
  69.     2  EDIT        -Create or change source data           PF KEYS  -24         
  70.     3  UTILITIES   -Perform utility functions                                   
  71.     4  FOREGROUND  -Invoke language procedures in foreground                    
  72.     5  BATCH       -Submit job for language processing                          
  73.     6  COMMAND     -Enter TSO command or CLIST                                  
  74.     7  DIALOG TEST -Perform dialog testing                                      
  75.     8  LM UTILITIES-Perform library management utility functions                
  76.     C  CHANGE      -Display summary of changes for this release                 
  77.     T  TUTORIAL    -Display information about ISPF/PDF                          
  78.     X  EXIT        -Terminate ISPF using log and list defaults                  
  79.                                                                                 
  80.    Enter END command or PF3 to terminate ISPF.                                  
  81.                                                                                 
  82.                                                                                 
  83.                                                                                 
  84.    SECTION ONE: Creating your COBOL program.                                    
  85.                                                                                 
  86.                                                                                 
  87.     1.1) Enter 6 at the "OPTION ===>" prompt of the ISPF/PDF PRIMARY OPTION     
  88.          MENU, and hit return to go to TSO COMMAND PROCESSOR panel.             
  89.                                                                                 
  90.     1.2) Type CREATE at the cursor, and hit return.  Next, type your initial
  91.          when you are asked to "ENTER LIBRARY/APPLICATION NAME  ===>".  Hit
  92.          return, and type COBOL at the next prompt.  Hit return one more
  93.          time when you see three asterisks displayed (hit return anytime        
  94.          you see *** displayed).                                                
  95.                                                                                 
  96.     1.3) Use the F4 key to go back to the primary menu.  Then, enter 2 at       
  97.          the "OPTION ===>" prompt to go to the EDIT - ENTRY PANEL.              
  98.          Fill the sections of this panel as shown below:                        
  99.                                                                                 
  100. EJECT                                                                           
  101.    ------------------------- EDIT - ENTRY PANEL ---------------------------     
  102.    COMMAND ===>                                                                 
  103.                                                                                 
  104.    ISPF LIBRARY:                                                                
  105.       PROJECT ===> your userid                                                  
  106.       GROUP   ===> your initials     ===>           ===>         ===>           
  107.       TYPE    ===> COBOL                                                        
  108.       MEMBER  ===> program name    (Blank for member selection list)            
  109.                                                                                 
  110.    OTHER PARTITIONED OR SEQUENTIAL DATA SET:                                    
  111.       DATA SET NAME  ===>                                                       
  112.       VOLUME SERIAL  ===>          (If not catalogued)                          
  113.                                                                                 
  114.    DATA SET PASSWORD ===>          (If password protected)                      
  115.                                                                                 
  116.    PROFILE NAME      ===>          (Blank defaults to data set type)            
  117.                                                                                 
  118.                                                                                 
  119.           Hit return and you will see an empty file as shown below:             
  120.                                                                                 
  121.                                                                                 
  122.    EDIT --- User-id.Initial.COBOL(member) ------------- COLUMNS 001 072         
  123.    COMMAND ===>                                       SCROLL ===>PAGE           
  124.    ****** *********************** TOP OF DATA **************************        
  125.    ''''''                                                                       
  126.    ''''''                                                                       
  127.    ''''''                                                                       
  128.    ''''''                                                                       
  129.    ''''''                                                                       
  130.    ''''''                                                                       
  131.       .                                                                         
  132.       .                                                                         
  133.                                                                                 
  134.                                                                                 
  135.        Type UNNUM at the cursor and hit return.  Press the TAB key twice,       
  136.        type the letter "I" (insert), and hit return.  Tab back then type        
  137.        COLS and press return.  Use the right arrow key to move the cursor
  138.        to the right.  The first line of the body of a COBOL program will
  139.        start in column 8.  The first line in the body of the COBOL program
  140.        will be the IDENTIFICATION DIVISION.
  141.  
  142.                                                                                 
  143.    EDIT --- User-id.Initial.COBOL(member) ------------- COLUMNS 001 072         
  144.    COMMAND ===>                                        SCROLL ===>PAGE          
  145.    ****** ********************** TOP OF DATA ***************************        
  146.    =COLS>----+----1----+----2----+----3----+----4----+----5----+----6----+      
  147.    ''''''                                                                       
  148.    ****** *********************BOTTOM OF DATA **************************        
  149. EJECT                                                                           
  150.          Press return followed by the HOME key.  This will take your cursor
  151.          back to the COMMAND line.  Type the command RES which stands for
  152.          RESEQUENCE.  This will cause the rulers to disappear.
  153.          Upon entering successive lines of text, the cursor will be placed       
  154.          under the first non blank character of the previous line.  Since
  155.          many of the lines of COBOL start in either column 8 or 12, this        
  156.          is most convenient.  You don't need to use the cursor keys or
  157.          space key near as much when entering successive lines of text.
  158.                                                                                 
  159.          After typing your program you should press the home key and type       
  160.          the word SAVE on the COMMAND line.  You may type CANCEL on the COMMAND
  161.          line to leave the EDIT screen without saving your program or changes   
  162.          that you made to an existing program.                                  
  163.                                                                                 
  164.          In writing the File Description (FD) sections of your COBOL            
  165.          program, there are certain conventions that must be followed           
  166.          when interfacing with the IBM operating system.  The FD phrase
  167.          'BLOCK CONTAINS 0 CHARACTERS' allows record and block size to be       
  168.          controlled by the Dataset Definition (DD) statements in the            
  169.          JCL rather than the COBOL program.                                     
  170.          Use the example below to help you with your own program.               
  171.                                                                                 
  172.    EDIT --- user-is.init.COBOL(TEST1) - 01.01 --------- COLUMNS 001 072         
  173.    COMMAND ===>                                     SCROLL ===>PAGE             
  174.    ****** ******************** TOP OF DATA **************************           
  175.    000001 //STEP1    EXEC  COBUCLG                                              
  176.    000002         IDENTIFICATION DIVISION.                                      
  177.    000003         PROGRAM-ID. JOE-PROGRAMMER.                                   
  178.    000004         DATE-COMPILED. JANUARY 5, 1993.                                    000005         ENVIRONMENT DIVISION.                                         
  179.    000006         CONFIGURATION SECTION.                                        
  180.    000007         SOURCE-COMPUTER. IBM-370.                                     
  181.    000008         OBJECT-COMPUTER. IBM-370.                                     
  182.    000009         INPUT-OUTPUT SECTION.                                         
  183.    000010         FILE-CONTROL.                                                 
  184.    000011              SELECT INFILE ASSIGN TO UT-S-OLD.                        
  185.    000012              SELECT OUTFILE ASSIGN TO UT-S-NEW.                       
  186.    000013         DATA DIVISION.                                                
  187.    000014         FILE SECTION.                                                 
  188.    000015         FD  INFILE                                                    
  189.    000016             LABEL RECORDS ARE STANDARD                                
  190.    000017             BLOCK CONTAINS 0 CHARACTERS                               
  191.    000018             RECORD CONTAINS 56 CHARACTERS                             
  192.    000019             DATA RECORD IS INFILE.                                    
  193.    000020         01  INFILE-COMPONENT.                                         
  194.    000021             02  NAME                             PIC X(20).           
  195.    000022             02  ACCT-NO                          PIC X(5).            
  196.    000023             02  SSN                              PIC X(11).           
  197.    000024             02  FILLER                           PIC X(20).           
  198.    000025         FD  OUTFILE                                                   
  199.    000026             LABEL RECORDS ARE STANDARD                                
  200.    000027             BLOCK CONTAINS 0 CHARACTERS                               
  201.    000028             RECORD CONTAINS 36 CHARACTERS                             
  202.    000029             DATA RECORD IS OUTFILE.                                   
  203.    000030         01  OUTFILE-COMPONENT.                                        
  204.    000031             02  NAME                             PIC X(20).           
  205.    000032             02  ACCT-NO                          PIC X(5).            
  206.    000033             02  SSN                              PIC X(11).           
  207.    000034         WORKING-STORAGE SECTION.                                      
  208.    000035         77  INFILE-STATUS                        PIC X(2).            
  209.    000036             88  END-OF-FILE                      VALUE "10".          
  210.    000037         PROCEDURE DIVISION.                                           
  211.    000038         0000-MAIN.                                                    
  212.    000039             PERFORM 0010-INITIALIZE.                                  
  213.    000040             PERFORM 0020-PROCESS-ONE-ACCOUNT UNTIL                    
  214.    000041                          END-OF-FILE.                                 
  215.    000042             PERFORM 0030-CLOSE.                                       
  216.    000043             STOP RUN.                                                 
  217.    000044         0010-INITIALIZE.                                              
  218.    000045             OPEN INPUT INFILE.                                        
  219.    000046             OPEN OUTPUT OUTFILE.                                      
  220.    000047             READ INFILE RECORD                                        
  221.    000048                  AT END MOVE "10" TO INFILE-STATUS.                   
  222.    000049         0020-PROCESS-ONE-ACCOUNT.                                     
  223.    000050             MOVE CORR INFILE-COMPONENT TO                             
  224.    000051                  OUTFILE-COMPONENT.                                   
  225.    000052             WRITE OUTFILE-COMPONENT.                                  
  226.    000053             READ INFILE RECORD                                        
  227.    000054                  AT END MOVE "10" TO INFILE-STATUS.                   
  228.    000055         0030-CLOSE.                                                   
  229.    000056             CLOSE INFILE.                                             
  230.    000057             CLOSE OUTFILE.                                            
  231.    000058 //GO.OLD    DD   DSN=userid.init.INDATA,DISP=SHR,                     
  232.    000059 //          DCB=(BLKSIZE=56,RECFM=FB)                                 
  233.    000060 //GO.NEW    DD   DSN=userid.init.OUTDATA,DISP=OLD,                    
  234.    000061 //          DCB=(BLKSIZE=36,RECFM=FB)                                 
  235.    ****** ********************** BOTTOM OF DATA **************************      
  236. EJECT                                                                           
  237.           In the example above, the lines that contain "//" in                  
  238.           columns one and two, are the JCL statements.  JCL statements          
  239.           perform the operations necessary to compile, link and execute         
  240.           your program.                                                         
  241.           Notice that STEP1 executes a JCL procedure called COBUCLG.            
  242.           This procedure will compile, link, and execute a COBOL program.       
  243.           Within this procedure there are two steps called LNK and GO.          
  244.           JCL Dataset Definitions and library references may be inserted        
  245.           into the procedure by prefixing them with the step name followed      
  246.           by a period.  The LNK step contains all the JCL necessary to
  247.           to form an executable load module.  The GO step contains all the
  248.           JCL necessary in linking input and output data files.
  249.           In the example above, GO.OLD tells the operating system that the      
  250.           internal link name OLD to which the logical file INFILE was           
  251.           assigned using the SELECT statement under the FILE-CONTROL section    
  252.           of the program is to be referenced to the Data Set Name (DSN) or      
  253.           the actual input file that you already created on disk.               
  254.           GO.NEW references the internal link name NEW to which OUTFILE         
  255.           was assigned by the SELECT statement under the FILE-CONTROL section.  
  256.           The Disposition of the file informs the operating system whether or   
  257.           not the file currently exists.  The input file has a file disposition
  258.           equal to SHR (DISP=SHR).  The output file has a file disposition equal
  259.           to OLD (DISP=OLD).  This means that we have to create the input and
  260.           output files before we execute our program.
  261.                                                                                 
  262.    SECTION TWO: Creating your data files.                                       
  263.                                                                                 
  264.      2.1) Type =3.2 at the "COMMAND ===>" prompt to go to the next panel.       
  265.           Use the TAB key to tab to the "TYPE ===>" prompt.  Enter the name     
  266.           of your input file.  Press the HOME key and enter "A" (for
  267.           allocation) and press return.  another panel will be displayed
  268.           as the one shown below.  Use these same parameters as input
  269.           to your panel.
  270.                                                                                 
  271.    ------------------------ ALLOCATE NEW DATA SET -------------------------     
  272.    COMMAND ===>                                                                 
  273.                                                                                 
  274.    DATA SET NAME: User-id.Initial.Type                                          
  275.                                                                                 
  276.      VOLUME SERIAL   ===>          (Blank for authorized default volume)        
  277.      SPACE UNITS     ===>TRKS      (BLKS, TRKS or CYLS)                         
  278.      PRIMARY QUAN    ===>1         (in above units)                             
  279.      SECONDARY QUAN  ===>1         (in above units)                             
  280.      DIRECTORY BLOCKS===>0         (zero for sequential data set)               
  281.      RECORD FORMAT   ===>FB                                                     
  282.      RECORD LENGTH   ===>56   << Sum of the pictures for this file >>           
  283.      BLOCK SIZE      ===>56   << Sum of the pictures for this file >>           
  284.                                                                                 
  285.           For the RECORD LENGTH and BLOCK SIZE sections, enter the same         
  286.           number you used in the RECORD CONTAINS clause of this file.           
  287.           Then hit return to go back to the DATA SET UTILITY panel.  Tab        
  288.           to the "TYPE ===>" prompt and enter the name of your output file.     
  289.      2.2) Create your output file the same way you created your input file.     
  290. EJECT                                                                           
  291.                                                                                 
  292.    SECTION THREE: Filling in your data.                                         
  293.                                                                                 
  294.      3.1) Type =2 at the "OPTION ===>" prompt to go to EDIT panel.  Enter
  295.           the name of your input file.  The file name should be entered
  296.           at the "TYPE ===>" prompt.  This name has to be the same
  297.           as the one used in the DSN parameter of your input file.  Now,
  298.           press return to enter your input data.
  299.                                                                                 
  300.      3.2) Press the return key.  Your screen should now have two rows of
  301.           asterisks.  Move you cursor to the first asterisk on the first
  302.           line and type the letter I.  After pressing return you will
  303.           subsequently be prompted for each line of data.  If no data
  304.           is entered prompting will stop.  You may then move your cursor
  305.           to a line number while typing the letter I in order to resume         
  306.           prompting.                                                            
  307.                                                                                 
  308.      3.3) When you are finished creating your input file, go back to the        
  309.           EDIT - ENTRY PANEL by typing =2.  At the "COMMAND ===>" prompt,
  310.           type the name of your output file (this name should be the same       
  311.           one used in the DSN parameter).                                       
  312.           Next, hit return, and type SAVE to save the empty output file.        
  313.                                                                                 
  314.    SECTION FOUR: Executing your COBOL program.                                  
  315.                                                                                 
  316.                                                                                 
  317.      4.1) To execute your program, enter =2 at the "COMMAND ===>" prompt.       
  318.           Hit return to go to the EDIT - ENTRY PANEL.                           
  319.                                                                                 
  320.      4.2) Enter the word COBOL at the "TYPE ===>" prompt of this panel.         
  321.           Then, enter the name of your COBOL program at the "MEMBER ===>"       
  322.           prompt.  Press return and your program will be displayed at           
  323.           the terminal.                                                         
  324.                                                                                 
  325.      4.3) Enter the command 'SUBT A,10' at the "COMMAND ===>" prompt of         
  326.           this panel and press return to submit your program to the system.     
  327.           The "A" is the jobname character that will be suffixed to             
  328.           your userid.  The batch job is to use no more than 10 seconds
  329.           of central processing time.
  330.  
  331. EJECT
  332.    EDIT --- user-is.init.COBOL(TEST1) - 01.01 --------- COLUMNS 001 072
  333.    COMMAND ===> SUBT A,10                           SCROLL ===>PAGE
  334.    ****** ******************** TOP OF DATA **************************
  335.    000001 //STEP1    EXEC  COBUCLG
  336.    000002         IDENTIFICATION DIVISION.
  337.    000003         PROGRAM-ID. JOE-PROGRAMMER.
  338.    000004         DATE-COMPILED. MAY 5, 1990.
  339.    000005         ENVIRONMENT DIVISION.
  340.    000006         CONFIGURATION SECTION.
  341.    000007         SOURCE-COMPUTER. IBM-370.
  342.    000008         OBJECT-COMPUTER. IBM-370.
  343.    000009         INPUT-OUTPUT SECTION.
  344.    000010         FILE-CONTROL.
  345.                      .
  346.                      .
  347.                      .
  348.                      .
  349.    000053             READ INFILE RECORD
  350.    000054                  AT END MOVE "10" TO INFILE-STATUS.
  351.    000055         0030-CLOSE.
  352.    000056             CLOSE INFILE.
  353.    000057             CLOSE OUTFILE.
  354.    000058 //GO.OLD    DD   DSN=userid.init.INDATA,DISP=SHR,
  355.    000059 //          DCB=(BLKSIZE=56,RECFM=FB)
  356.    000060 //GO.NEW    DD   DSN=userid.init.OUTDATA,DISP=OLD,
  357.    000061 //          DCB=(BLKSIZE=36,RECFM=FB)
  358.    ****** ********************** BOTTOM OF DATA **************************
  359.  
  360.           Then, hit return, and you will see
  361.  
  362.           IKJ56250I JOB useridA(JOBnumber) SUBMITTED
  363.           ***
  364.  
  365. EJECT
  366.    SECTION FIVE: Accessing your job output.
  367.  
  368.      5.1) At the "COMMAND ===>" prompt, type =o.h to go to the SDSF or System
  369.           Display and Search Facility PANEL H option.
  370.  
  371.    _____________________________________________________________________________
  372.    |SDSF HELD OUTPUT DISPLAY ALL CLASSES        406 LINES LINE 1-1 (1)          
  373.    |COMMAND INPUT ===>                                     SCROLL ===> HALF     
  374.    |NP JOBNAME  TYPE JNUM #DSNS CRDATE  C FCB  DEST     ROUTE #RECORDS RNUM  RD-
  375.    | S USERIDA   JOB 1139     5 8/15/91 X **** GSUMVS1             350 0275     
  376.    |____________________________________________________________________________
  377.                                                                                 
  378.                                                                                 
  379.                                                                                 
  380.                                                                                 
  381.                                                                                 
  382.      5.2) Tab to the field under the NP heading and type in the letter          
  383.           S to view you job output.                                             
  384.                                                                                 
  385.                                                                                 
  386.           Below is a facsimile of a successful COBOL execution as viewed        
  387.           from the SDSF menu option H.                                          
  388.                                                                                 
  389.    BROWSE - USGHND.DAY.SPF235.OUTLIST ------------ LINE 000000 COL 001 080      
  390.    COMMAND ===>                                            SCROLL ===>HALF      
  391.    ********************************** TOP OF DATA ************************      
  392.    1                    J E S 2  J O B  L O G  --  S Y S T E M  G S U 1  --  N O
  393.    0                                                                            
  394.     11.12.36 JOB 2185  ICH70001I USGHND   LAST ACCESS AT 11:09:25 ON TUESDAY, OC
  395.     11.12.36 JOB 2185  $HASP373 USGHNDX  STARTED - INIT  A - CLASS A - SYS GSU1 
  396.     11.12.45 JOB 2185  -                                                --TIMING
  397.    (                                                                            
  398.     11.12.45 JOB 2185  -JOBNAME  STEPNAME PROCSTEP    RC   EXCP   CONN    CPU   
  399.     11.12.45 JOB 2185  -USGHNDX  COB                  00    332   1851    .00   
  400.     11.12.45 JOB 2185  -USGHNDX  LKED                 00    332   1851    .00   
  401.     11.12.45 JOB 2185  -USGHNDX  GO                   00    332   1851    .00   
  402.     11.12.45 JOB 2185  -USGHNDX  ENDED.  NAME-USGHND  /\       TOTAL CPU TIME=  
  403.     11.12.46 JOB 2185  $HASP395 USGHNDX  ENDED        ]]                        
  404.    0------ JES2 JOB STATISTICS ------                 ]]                        
  405.    - 18 OCT 88 JOB EXECUTION DATE                     ]]-------------------     
  406.    -         9 CARDS READ                             ] A RETURN CODE (RC)      
  407.    -       152 SYSOUT PRINT RECORDS                   ] OF ZERO MEANS YOUR      
  408.    -         0 SYSOUT PUNCH RECORDS                   ] PROGRAM EXECUTED        
  409.    -         8 SYSOUT SPOOL KBYTES                    ] WITHOUT ERRORS.         
  410.    -      0.17 MINUTES EXECUTION TIME                 ]                         
  411.        1     //USGHNDX   JOB I994998,USGHND,          ]--------------------     
  412.              //     NOTIFY=USGHND,CLASS=A,MSGLEVEL=(1,1),                       
  413.              //     USER=USGHND,TIME=(0,5)                                      
  414.                                                                                 
  415.                                                                                 
  416.                                                                                 
  417.      5.3) To print your output file, type O under the NP heading.  Your output  
  418.           will normally be printed on one of the production laser printers
  419.           located on the ground floor of the Library South building.  You can
  420.           change the destination by toggling to the field under the DEST header
  421.           and overlaying the GSUMVS1 destination.  For example, if you want
  422.           your output printed on the high-speed printer located in LS109,
  423.           overlay the GSUMVS1  with TRM1.
  424.           See the SDSF handout for further information.
  425.                                                                                 
  426.    SECTION SIX: Logging off.                                                    
  427.                                                                                 
  428.           To logoff, enter =X at the "COMMAND ===>" or "OPTION ===>"            
  429.           prompt of any panel.  Once the operating system displays the
  430.           message READY, you may then type the command LOGOFF.
  431.           At this point you will be disconnected from the system.
  432.                                                                                 
  433.    IMPORTANT NOTE:                                                              
  434.                                                                                 
  435.           The program, input and output files that you have created are         
  436.           saved in the system.  Therefore subsequent executions should          
  437.           reference sections 4.1 through 5.4.                                   
  438. EJECT                                                                           
  439.                        METHODS OF DEBUGGING                                     
  440.                                                                                 
  441.           There are two popular ways to debug a COBOL program on the            
  442.           MVS operating system.                                                 
  443.                                                                                 
  444.           METHOD #1:                                                            
  445.                                                                                 
  446.           If the program compiles with no syntax errors, but continues          
  447.           to execute beyond the time allocated on the SUBT command, the         
  448.           program may be in an infinite loop.  In order to isolate the
  449.           looping pattern you may make use of the COBOL statement               
  450.           READY TRACE.  This command is always placed in column 12
  451.           of your program and is placed, just like any other COBOL              
  452.           statement, within a paragraph.  Upon execution of the program,
  453.           the name of each paragraph will be written to your SYSOUT.
  454.           With this information, you may be able to establish some sort         
  455.           of looping pattern based on the names of the paragraphs.              
  456.           The READY TRACE statement requires an additional line of JCL          
  457.           in order to work.  This statement should be typed at the bottom
  458.           of your program as follows:                                           
  459.                                                                                 
  460.                  //SYSOUT DD SYSOUT=*                                           
  461.                                                                                 
  462.           METHOD #2:                                                            
  463.                                                                                 
  464.           If you want to take a peek at a given variable in your program,       
  465.           you may do this using the COBOL DISPLAY statement.  If you have
  466.           a variable named CNTR, you may look at the contents of this           
  467.           variable using the DISPLAY statement.  It might look as follows:
  468.                                                                                 
  469.           DISPLAY CNTR.                                                         
  470.                                                                                 
  471.           The DISPLAY statement also starts in column 12.  The DISPLAY
  472.           statement also requires an additional line of JCL in order to         
  473.           work.  This statement should be typed at the bottom of your
  474.           program as follows:                                                   
  475.                                                                                 
  476.                  //SYSOUT DD SYSOUT=*                                           
  477.                                                                                 
  478. EJECT                                                                           
  479.                     COMMONLY GENERATED ERROR MESSAGES                           
  480.                                                                                 
  481.                                                                                 
  482.    1)    If you are getting a QSAM error message from the JCL, Job Control       
  483.          Language, then check to make sure the following are correct:           
  484.                                                                                 
  485.          A)  Make sure the record size within your program matches the          
  486.              record size of the file on disk.                                   
  487.                                                                                 
  488.          B)  Make sure the block size within your program matches the           
  489.              block size of the file on disk.                                    
  490.                                                                                 
  491.          C)  Make sure that for every FD, File Description, there exist         
  492.              a 'BLOCK CONTAINS 0 CHARACTERS'.                                   
  493.                                                                                 
  494. EJECT                                                                           
  495.                                                                                 
  496.                     COMMONLY USED FEATURES OF THE FILE EDITOR                   
  497.                                     ISPF/PDF                                    
  498.                                                                                 
  499.       PROGRAM                                                                   
  500.    FUNCTION KEYS               NOTE: The more frequently used keys have         
  501.                                      been marked with an asterisk               
  502.      F1     HELP                                                                
  503.      F2     SPLIT SCREEN                                                        
  504.    * F3     END                                                                 
  505.      F4     RETURN                                                              
  506.      F5     RFIND                                                               
  507.      F6     RCHANGE                                                             
  508.    * F7     UP SCREEN                                                           
  509.    * F8     DOWN SCREEN                                                         
  510.      F9     SWAP                                                                
  511.    * F10    LEFT SCREEN                                                         
  512.    * F11    RIGHT SCREEN                                                        
  513.      F12    CURSOR                                                              
  514.                                                                                 
  515.    ------------------------------------------------------------------------     
  516.                                                                                 
  517.                                                                                 
  518.       ISPF/PDF                                                                  
  519.        MENUS                                                                    
  520.                                                                                 
  521.    * =2     EDIT                                                                
  522.      =3.1   DELETE MEMBERS                                                      
  523.      =3.2   DELETE DATA SETS                                                    
  524.      =3.4   GET LISTING OF ALL DATA SETS                                        
  525.      =3.6   GET PROGRAMS OF DATA FILES SENT TO PRINTER                          
  526.                                                                                 
  527.    * =X     EXIT OR LOGOFF SYSTEM   (then type: logoff)                         
  528.                                                                                 
  529.                                                                                 
  530.    ------------------------------------------------------------------------     
  531.                                                                                 
  532.                       KEYBOARD NOTES                                            
  533.                                                                                 
  534.    *****      WHENEVER PROMPTED WITH '***' PRESS RETURN         *****           
  535.    *****      IF PROMPTED WITH "READY" TO GET BACK ON THE       *****           
  536.    *****      SYSTEM TYPE "ICF", OR IF YOU ARE FINISHED         *****           
  537.    *****      TYPE "LOGOFF".                                    *****           
  538.                                                                                 
  539.    *****      IF KEYBOARD FREEZES, PRESS THE TAB KEY            *****           
  540.    *****      IF STILL FROZEN, PRESS THE return key             *****           
  541.    *****      IF STILL FROZEN, PRESS CNTL G                     *****           
  542.    *****      IF KEYBOARD IS STILL LOCKED UP, PRESS ALT 2       *****           
  543.    *****      IF KEYBOARD IS STILL LOCKED UP, PRESS ALT 1       *****           
  544.                                                                                 
  545.    ------------------------------------------------------------------------     
  546.                                                                                 
  547.