Friday, February 17, 2012

FJOB

FJOB will list all jobs that will be scheduled during a specific time.  If you want to see what is scheduled on January 2, enter:

FJOB,FROM=0102,SPAN=24:
FJOB,JOB=jobname,FROM=0102,SPAN=24:

FJOB,FROM=0102,SPAN=24
FJOB                                                                                                                                      DATE mm-dd-yy    PAGE 0001
                                                                FORECAST FOR CA-7 JOBS
                PERIOD : 01-02-yy AT 0000 HRS TO 01-02-yy AT 2400 HRS
               
                JOB(S)                    : ALL

                SYSTEM(S)            : ALL

                OPTIONS               : BOTH JOB- AND DSN-TRIGGERED JOBS INCLUDED
                                                   CONNECTED OUTPUT NETWORKS NOT INCLUDED

                HIGHEST JOB DATE AND TIME                                          : YY0002/2103
                HIGHEST JOB NAME                                                            : Last job determined to be scheduled

                                - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
FJOB,FROM=0102,SPAN=24
FJOB                                                                                                                                      DATE mm-dd-yy    PAGE 0001
                                                                FORECAST FOR CA-7 JOBS
                PERIOD : 01-02-yy AT 0000 HRS TO 01-02-yy AT 2400 HRS

  A                                B                    C                        D          E            F                   G                        H
START DTTM         END DTTM        JOB              SYS         SCHED#   SID        TRIGGERING        JOB/DSN                RQMT

yy002/0100             yy002/0110     KMPA@CMS  CMPMER   SJ00002    001                                                                    
yy002/0110             yy002/0130     KMPA003D     CMPMER                   LEVLE1    001   KMPA@CMS                            
yy002/2100             yy002/2100      KMPA@OMS NMPMERC LEV002    001    KMPA003D                               NOEX     
yy002/2100             yy002/2100      KMPA005D    CMPMERC LEV002    001    KMPA003D                               NOEX     

SFCI-00 REQUEST COMPLETED AT hh:mm:ss ON yy.ddd                                                            

Item Description - Starting on the left side:

  •         START DTTM - (Start Date/Time)   is the day requested to forecast and calculated start time of the job listed under the column JOB
  •         END  DTTM - (End Date/Time)   is the calculated end date and time of the job listed under the column JOB
  •         JOB -  Jobname of  the job(s) scheduled to run with in the date /time requested.
  •         SYS - System(s) associated with  the job(s) listed under the JOB column.
  •         SCHD#  - Schedule Job  Number assigned by CA-7 associated with the job(s) listed under JOB column.
  •          SID - Schedule Id which the job(s) listed under the JOB column.  Each Job schedule contains a schedule id.
  •         TRIGGERING JOB/DSN - Indicates the job or dataset that triggers the job listed in under JOB column.
  •         RQMT -  Identifies NON Executable jobs (NOEX), JCL Override (JCLO), Schedule turned off (OFF), Schedule Skipped (SKP)

Thursday, February 16, 2012

COBOL FAQS-3

Q.      COBOL is an acronym. What does it stand for?
A         Common Business-Oriented Language.

Q.      What are the structured development aids introduced in COBOL II?
A         COBOL II offers the following options :
a.         EVALUATE : permits CASE construction.
b.         The in-line PERFORM : permits 'do’ construction.
c.         TEST BEFORE and TEST AFTER in the PERFORM statements : permit 'do                while' and 'do until' constructions.

Q.      What feature in COBOL II is Similar to features in other programming languages?
A         The most obvious are the explicit scope terminators for most processing actions. An alphabetical list indicates the variety :
end-add           end-if               end-search
end-call            end-multiply    end-start
end-compute    end-perform    end-string
end-delete        end-read          end-subtract
end-divide       end-return        end-unstring
end-evaluate    end-rewrite      end-write

The scope terminator ',' (as well as the period '.') is still available.

Q.     What are the three categories of data defined in the DATA division?
A         The three categories of data defined in DATA division are :
·                     The file section (FD) information
·                     Working storage information
·                     Linkage-section data definitions

Q.      When is using READ INTO not advisable?
A         READ INTO performs two actions : the file is read into the buffer and the record is moved to working storage. The construct assumes that the LRECL of every record is the same. When used with variable-length records, the results may be "unexpected".

Q.      What are the techniques for achieving "top-down" programming?
A         Top-down is an effort to avoid spaghetti code and is sometimes referred to as "go to less" programming. Processing is performed from beginning to the end of paragraphs. Performs rather than "go tos" are used to move through code. The PERFORM... THRU structure should be used only when THRU is to an EXIT paragraph.

Q.      What is the EVALUATE statement?
A         EVALUATE is the alternative to the nested IF statements and is used to select from a list of processing actions. WHEN is used instead of IF to determine if the action is to be taken. Like the IF statement, the WHEN statement should be coded from the most likely to the least likely occurrence. Like the nested IF, once the condition is true, control passes from evaluate statement to the next statement in the program.

Q.      What are the two most common forms of the EVALUATE statement?
A         The two most common forms of the EVALUATE statement are :
1.         EVALUATE TRUE, which allows multiple variables to be checked for a true condition. The list of options being tested must be prioritized, as the EVALUATE statement selects only the first TRUE condition per statement.
2.         EVALUATE VARIABLE-NAME checks multiple options for TRUE condition of a variable.

Q.      What does the INITIALIZE statement do?
A         The INITIALIZE statement initializes data areas to zeros and spaces.

Q.     How can you use INITIALIZE for specifying specific values?
A         INITIALIZE GROUP-ITEM REPLACING ALPHANUMERIC DATA By HIGH-VALUES.  When the REPLACING option is used, only specific type will be initialized.

Q.     What is reference modification?
A         Reference modification is the name for substring manipulations. The ‘:’ allows part of a data item to be used without defining data item in the data division.

Q.     Give two examples of how you would use reference modification?
A         1.         In a list of ZIP codes, the first three digits define a geographic area :
IF ZIP ( I : 3 ) = '100'
AREA = MANHATTAN
END - IF
2.         MOVE 'MEXICO' TO STATE ( 5 : 6 ) could change NEW JERSEY to NEW MEXICO.

Q.      What is a nested program?
A         A nested program is a program that allows coding of multiple procedure division within a single program. It is like a CALL, but it is more efficient.

Q.     What is the difference between a directly contained and an indirectly contained program in a nested program?
A         A directly contained program is in the next-lower nesting, while the indirectly contained program is more than one nesting below.

Q.      Can there be a problem using ROUNDED in a compute statement?
A         Yes. The compute rounds each intermediate result in a compute statement and not just the final result.


Q.      Name some of the advantages of COBOL II?
A         VS-COBOL II makes the operation of computer programs more efficient :
·                     It allows code to be shared.
·                     It optimizes code.
·                     It allows faster sorting.
·                     It eases program bugging and maintenance namely :
·                     Supports a debugging tool: COBTEST.
·                     Program listings provide information in a user-oriented way.
·                     Formatted dumps display status of programs and files in COBOL format, including data names and content.
·                     VS-COBOL/CICS interaction is easier to work with because of defined interfaces.

Q.      What are VS-COBOL II special features?
A         The support of 31-bit addressing permits programs to operate “above the line” and to use larger tables in larger programs. This added space allows VSAM buffers to be placed above the 16-meg line, therefore the buffer can be larger.

Q.      What options have been removed in COBOL II?
A         COBOL II does not support ISAM and BDAM access methods and clauses which are specific to them. In addition, the following have been eliminated such as :
·                     REPORTWRITER
·                     EXAMINE
·                     TRANSFORM
·                     READY TRACE and RESET TRACE
·                     REMARKS paragraph and NOTES statement
·                     The ON statement (ON 1 PERFORM ...)

Q.      What is a nested-copy statement?
A         Independent blocks of code can be copied into the main sections of a program during compilation. COBOL II allows copied code to copy other code.

Q.      What is an example of application efficiency provided by COBOL II?
A         COBOL II will allow a program to be compiled as RE-ENTRANT. A re-entrant program can be placed in a shared virtual storage area, so that one copy of program is used to satisfy all concurrent requests for the program.

Q.      What is COBTEST?
A         COBTEST is a debugging tool for examining, monitoring and controlling VS-COBOL II programs in a test environment. Programs can be debugged by using a full-screen interactive mode, as well as a line interactive or batch mode. DATA may be altered, logic may be changed and results can be viewed on-line.

Q.      How has the return code for VSAM files been changed in COBOL II?
A         The return code has been enlarged to 6 bytes and returns the VSAM return code when the FILE STATUS is not 00. The format of the expanded return code is as follows :
·                     REGISTER 15 Return Code                 PIC 9(2) COMP.
·                     FUNCTION CODE                              PIC 9(1) COMP.
·                     FEEDBACK CODE                             PIC 9(3) COMP.

Q.      What type of documentation would you recommend for a COBOL program?
A         Document code changes at the beginning of the Program. The documentation should include chronological references following the date compiled statement and should include date in a fixed position and a brief description of the change in a fixed position.

Programming techniques such as the use of copybooks, meaningful variable name, use of 88 levels and top-down code also provide informative documentation.

Q.      What is the file organization clause?
A         The file organization clause identifies logical structure of a file.

Q.      Can the logical structure of a file be changed once it has been created?
A         No.

Q.      What is file organization indexed?
A         The file organization indexed is where the position of each logical record within a file is determined by indexes created with the file and embedded in a key in each record.

Q.      What is file organization sequential?
A         The file organization sequential indicates that records are loaded into a file based on a record-to-record relationship of data sequence. Sequential is the default file organization.

Q.      What is file organization relative?
A         The position of each logical record in the file is determined by its relative record number.

Wednesday, February 15, 2012

List the job flow for a scheduled job by CA7

FSTRUC will list the job flow for a scheduled job.  If you want to find out the triggering stream of a scheduled job, enter

FSTRUC,JOB=JOBE,SCHID=001  (FSTRUC,JOB=jobname,SCHID=nnn)  You will see the following:

FSTRUC,JOB=JOBE,SCHID=1
FSTRUC                                                                                                                                 DATE mm-dd-yy    PAGE 0001
                                                                FORECAST FOR CA-7 JOBS
                START TIME          : mm-dd-yy AT hhmm
               
                JOB(S)                    : KMPA@CMS

                SYSTEM(S)            : ALL                        JOBNET(S)            : ALL

                OPTIONS               : BOTH JOB- AND DSN-TRIGGERED JOBS INCLUDED
                                                   CONNECTED OUTPUT NETWORKS NOT INCLUDED

                HIGHEST JOB DATE AND TIME                                          : yyddd/hhmm
                HIGHEST JOB NAME                                                            : Last job determined to be scheduled

                                - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
FSTRUC,JOB=KMPA@CMS,SCHID=1
FSTRUC                                                                                                                                 DATE mm-dd-yy    PAGE 0001
                                                NETWORK STRUCTURE FOR CA-7 JOBS
                                START TIME          : mm-dd-yy AT hhmm

A                      B                      C          D                      E                      F                      G
LEV#                       JOB NAME             SYS         START DTTM          END DTTM            TRIGGERING        JOB/DSN/SID
--- KMPA@CMS. . . . . . . . . . . . . . . .  CMPMER   yyddd/hhmm           yyddd/hhmm
001     KMPA003D . . . . . . . . . . . . . . CMPMER     yyddd/hhmm         yyddd/hhmm         KMPA@CMS                          :001
002           KMPA@OMS . . . . . . . . .  CMPMER     yyddd/hhmm         yyddd/hhmm         KMPA003D                             :001
003                 KMPARVLTP. . . . . . . CMPMER     yyddd/hhmm         yyddd/hhmm         KMPA@OMS                          :001
002           KMPA005D .. . . . . . . . . .  CMPMER     yyddd/hhmm         yyddd/hhmm         KMPA003D                             :001

SFCI-00 REQUEST COMPLETED AT hh:mm:ss ON yy.ddd            
                                   
Item Description - Starting on the left side:

     LEV#  indicates at which level of the job steam this job is scheduled  (--- is the job requested or lead job, 001 identifies the job(s) directly triggered from the lead job, 002 identifies the jobs directly triggered from the level 001 jobs and so on.)
     JOB NAME  identifies the job(s) in the job stream.
     SYS - System(s) associated with  the job(s) listed under the JOBNAME column.
     START DTTM - (Start Date/Time)   is the day requested to forecast and calculated start time of the job listed under the column JOBNAME.
     END  DTTM - (End Date/Time)   is the calculated end date and time of the job listed under the column JOBNAME.
      TRIGGERING JOB/DSN - Indicates the job or dataset that triggers the job listed in under JOBNAME column.
     SID - Schedule Id which the job(s) listed under the JOBNAME column.  Each Job schedule contains a schedule id.