Cobol Mainframe Mania
Cobol Mainframe Mania
Cobol Mainframe Mania
ex : 01 ws-details .
02 ws-name a(10 ) .
02 ws-desig a(5) .
The only diff is we need put the " all " . Same can be done using
perform and repeting loop equal no of occur times .
READ FILE-NAME
(2)NO(never)
(4)NO (A command known as EXTERNAL cammand can be used to share variables b/w
main & sub prog. in that case linkage section is not required)
(5)don’t remember
(6)8 bytes
14) 77 I PI 9. PERFORM
VARYING I FROM 1 BY 1
UNTIL>10 DISPLAY ’OK’ END-
PERFORM. What output/msg
is likely when this program is
executed thru JCL?
Article Number: 9672 | Last Updated: Sat, Nov 28, 2009 at 1:12 AM This loop will give
compilation error becoz value of I is declared for only one digit , when loop reaches to 10
it will find mismatching b/w I & the current value i.e. 10.
15) what is meant by abbend
and what is the difference
between abbend and error.
when does and why dose it
come. what are the types?
Article Number: 9680 | Last Updated: Sat, Nov 28, 2009 at 1:21 AM Abend is short for
Abnormal end, abend is a term used to describe when a program or task ends without
warning. Generally when an abend is encountered the user will receive some type of error
message.
Error occurs because of Syntax problems or dataset disposition issues etc, whereas Abend
occurs because of some functional problems
Types:
SB37 - End of Volume
SE37 - Maximum extents reached
S013 - Member not found
S80A - Region limit violation
IDENTIFICATION DIVISION.
PROGRAM-ID. MID.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 STR1 PIC X(7) VALUE IS ’MANOJ’.
01 STR2 PIC X(1).
01 STR3 PIC X(7) VALUE SPACE.
*01 STR4 PIC X(7).
01 STRLEN PIC 9(1).
01 CTR1 PIC 9(1) VALUE IS 1.
PROCEDURE DIVISION.
INSPECT STR1 TALLYING STRLEN FOR CHARACTERS.
DISPLAY STRLEN.
PERFORM UNTIL STRLEN < 1
move a to b
now b=10.
1. QSAM (sequential) file. You can run it thru SORT utility adding SEQNUM and then
sort then sort by SEQNUM in DESC order
3. VSAM: I Batch, unload the VSAM file using SORT in DESC order by
key value
1) You cannot see the output of a program unless you have executed the program. but
You can see the results of a CICS pgm using INTERTEST.
2) I DONT KNOW
3) Flags would be assigned a value based on some condition. While using it for some
processing, there is no need to calculating every time. u can calculate one time and keep
the decision saved in a varibale. this can be used multiple times.
4) Say you are changing a module, this module may be interacting with many other
modules or the results of this module may be used by some other module. Any changes
done for some bug fix in this module should not change the functionality of any module.
This is main purpose of Imapct analysis.
To write the test cases, we need to be aware of the functioanlity of the module and the
working of the module.
// DD DSN=file2.file, DISP=SHR
// DD DSN=file3.file, DISP=SHR
Binding is a process that creates the access path logic for the sql
statements within a cobol program. after precompilation of a cobol
program a dbrm(has all the embedded sql statements) is created. This
dbrm is then bound to form a plan(executable form of the sql
statements).
A link is a CICS command and is used to pass data to and receive data from a CICS
program. data is passed in the CICS commarea.
//sysin dd *
sort fields=COPY
SUMFIELDS=NONE
/*
COMP-3
it allows S,9 ,V
when set ws-chg to true is done then ws-change-flag contains value ’Y’ .It is same as
move ’Y’ to ws-change-flag
If the statement is set ws-no-chg to true then ws-change-flag contains value ’N’.It is same
is move ’N’ to ws-change-flag
A statically called subroutine will not be in its initial state the next time it is called unless
you explicitly use INITIAL or you do a CANCEL. A dynamically called routine will
always be in its initial state.
To access the 5th element, you need to write a[4]. Because, Array
index starts from 0. In this case 0th element is 1, 1st element is 2.. etc
01 :AR00:RB-WORK-AREA
What is currency?
Article Number: 9981 | Last Updated: Sat, Nov 28, 2009 at 8:11 AM The old joke -
where the programmer thinks he is, but the DBMS knows he is not. Currency is the
location within the database during run-unit execution. There are four levels of currency:
current of run-unit is the record occurrence of the last successful find or obtain; current of
record type is for the most recent of each record type; current of record set is the most
recent within each set and current of area is within each area.
What is AMODE(24),
AMODE(31), RMODE(24) and
RMODE(ANY)? ( applicable to
only
Article Number: 10029 | Last Updated: Sat, Nov 28, 2009 at 9:11 AM These are
compile/link edit optio
What compiler option would
you use for dynamic linking?
Article Number: 10031 | Last Updated: Sat, Nov 28, 2009 at 9:15 AM DYNAM.
pic Clause.
What does the INITIALIZE verb
do?
Article Number: 10038 | Last Updated: Sat, Nov 28, 2009 at 9:21 AM
Alphabetic, Alphanumeric fields & alphanumeric edited items are set to
SPACES.
procedure division.
display a.
procedure division.
display a.