Professional Documents
Culture Documents
COBOL
1. Static call VS Dynamic call
2. How can you tell a CALL is static or dynamic just by looking at the code?
3. If a COBBAT program is calling COBBATDB program, how many plans would be there?
4. What are the ways you can pass values to other programs?
5. What are the ways you can get vales to a program?
6. What is the use of REPLACING clause in COBOL program against copybooks?
DB2
1. Catalog tables?
2. PLAN_TABLE - what are the values you will look in the table for optimization?
3. DEAD-LOCK?
4. If a program is running for a long time which ran very minimal time yesterday, what are all
could be the reason?
5. SQL codes: 904, 903, 904, 811, 803, 530
6. Why cursor?
7. I know my query will return more than one row but I don't want cursor what should I do? -provide FETCH FIRST ROW ONLY
8. What is 305? NULL indicator not handled properly.
9. What are the ways to handle NULL indicator?
10. DB2 utilities REORG, RUNSTAT
11. There is a student table where a student can have more subjects and marks secured in that
subject. Now want the complete details of student who appeared for more than 3 subjects.
12. UNION, UNION ALL which will give a distinct result? --- UNION
13. What is the difference between GROUP BY and ORDER BY?
14. COMMIT and ROLLBACK --- how will you secure opened cursor from COMMIT? Will ROLLBACK
close all the opened cursor?
15. SYSIBM tables?
16. How can you get the number of rows impacted by the last executed query? - SQLERRD (3)
17. Isolation levels? CS, RR, UR
18. I am compiling my DB2 with CS will it lock the table though I use simple select on a table?
19. What are cluster and index?
Company name : HCL
1. How will you build an internal array in COBOL program --- OCCURS clause
2. How will you create a dynamic internal table? --- using DEPENDING ON clause.
3. Do we need to declare the depending on clause variable in WS? -- NO
4. Dynamic and Static calls? How will you identify just by looking at the program?
5. How will you pass values to the other programs? Via Linkage section, MQ, Files, TDQ, TSQ,
Channels & Containers
6. Why we should use TSQ, we can use TDQ instead right?
7. What is Binary search? What is the default ordering of Binary search -- ASC.
8. What is executable PLAN or Package?
9. What is Subscript and Index?
Company Name - CTS
1.
2.
3.
4.
COBOL
Internal table
Search and search all
What are the changes need to be done while you changing a SERCH clause by SEARCH ALL clause
PERFORM types
String unstring inspect
How will you get the system date in COBOL pgm? and how will you get the date of 10 days after
today in COBOL (not using DB2)?
Evaluate and If end-if - some situation and answers
File organizations and access modes for VSAM files
JCL
VSAM utility - IDCAMS
Diff between Repro and SORT-copy?
What are the parameters used while creating GDG, KSDS, RRDS, ESDS
GDG - questions like - file created in step one and how it will be referred in next step. This job
abends after step1, then what are the changes need to be done while re-running/ changes
needed?
Understandings on JCLLIB, JOBLIB and STEPLIB
How will you check a file is empty and stop processing the next steps.
What is COND=EVEN, COND=ONLY
How many DD statement in a step?
How many steps in a PROC?
About JES3, JES2
CICS
What is DFHCOMMAREA
What is the return code when a file open error occurs in CICS
What are the CICS abends that you are aware of?
_________________
Guru:-)
You're never fully dressed without a smile
(Space) and Numeric and Numeric edited field items to 0 (Zero). The
INITIALIZE verb leaves FILLER items unchanged.
44. What is the importance of COMMON Attribute?
Its functions are utilized in nested COBOL programs. If COMMON attribute will not be
specified, the nested programs will find it impossible to access the program. An example of
COMMON program is Pgmname.
45. What will be the result if ON SIZE ERROR phrase is declared?
When the condition is true, the code written in the ON SIZE ERROR phrase is performed.
During this process, the content of the destination field does not change. If this phrase is not
mentioned, then the statement is executed with truncation. MOVE statement does not
support the ON SIZE ERROR phrase.
46. Can records be accessed randomly in ESDS?
Yes, records can be accessed randomly. It can be done by reference of Relative Byte Address
(RBA). However, it is not possible to delete records.
47. Why is free space left in KSDS Dataset?
While allocating KSDS Datasets, free space is declared at regular intervals at the time of
initial loading. This is done because this free space is utilized for keeping the data arranged
in sequence physically, even though inserted randomly.
02 B1
02 B2
can rename from A1 thru B2
Differences between CONTNUE and NEXT SENTENCE, give practical examples
Can you use a GO BACK in a stand alone program? what will happen if you use it?
Can you use COPY statement in a procedure division?
What is the difference between static and dynamic program? which is more efficient why?
have a main program P1 and two subprograms P2 and P3, is it possible that P2 can be
linked
statically and P3 be linked dynamically with the main program P1, if so how?
JCL
How to skip a PROC step without altering it.
How to change a dataset name in the PROC without altering the PROC
How will you copy a sequential file to a VSAM DATASET?
How do you pass a parameter from JCL to a COBOL program apart from PARM and SYSN
What is the maximum amount of characters that can pass from JCL to COBOL using SYSN
DD
*
How do accept the data passed from the JCL in a COBOL program
f there are 5 lines in SYSN DD * and if use 6 accept statements in my COBOL program
what
will happen
have mentioned the COPYLB in the JCL but the copybook is not expanded in the program
what would be the possible error you get
DB2
What is a cursor?
Can use a cursor for NSERT, UPDATE and DELETE?
MS
Any one abend in MS
What is LL parameter in MFS?
How do you invoke a MS DC screen
Where do you mention the transaction D in MS (which all components)
How do you insert a segment occurrence in an MS DB?
How is MS DB data stored?
How do you view the contents of MS DB DATABASE?
REXX
What all you can do in REXX?
How do you store records of a file in an array?
How do you find the position of a string in a stem variable?
How do you get the members in a PDS into an array?
General
What are the possible ways you can allocate a dataset?
While creating load libraries what all parameters will you give?
General
What is MVS?
How is MVS different from other OS?
What is the latest version of MVS?
What is 3.3 option?
COBOL
What is actual and formal parameter?
How do you pass parameter from main program to sub program and viceversa?
How do you make the changes made in the subprogram reflect in the main program?
Differences between CONTNUE and NEXT SENTENCE with practical examples
What is REDEFNES with example
What are the details that you provide while using an EXPECTOR
What is FLEAD and what is it used for
Using FLEAD what all datasets can you view?
What are the parameters that you give in FLEAD to view a dataset
What are the various organizations and access modes in COBOL FLES?
What is PSB?
What are the PROC options in PSB?
What is the dummy utility used in JCL?
01 WS-NAME.
02 WS-A.
04 WS-A1 PC X(04)
04 WS-A2 PC 99.
02 WS-B REDEFNES WS-A.
02 WS-C PC X(2) OCCURS 5 TMES.
What is the size of WS-NAME?
1)Diff b/w correlated subquery & Join
2)What is SQL
3)What is SPUF
4)What is PLA
5)How are they (above 3 ) different?
7)Two files have the same key, give logic on how would write all matching records to one file
&
non-matching records to another?
8)How will u create a GDG base, GDG version, read that version & create the next GDG
version
in same job?
9)Write an optimized query to fetch customer name belonging to a particular branch in the
following table?
Branch (col 1-3)
Account-no(col 4-10), unique key & 1st 3 digits are branch no) customer name(col 11-25)
10)How will u define a KSDS of avg length-100, max length-150, key length of 10.
11)How will u load data from flat file to KSDS?
12)How will u load data to a table?
13)Removing duplicates from file.
14)Common ABends
15)What are the parameters you would take into account while designing a pgm( a simple
pgm
which loads data to table)
16)Restart logic- f we are loading around 10 million records, when do we make a check point
entry?
17)How do change the dataset name in a proc without chging the proc?
Processes General
1) Whts CMM
2)How many KPA'S in CMM
3)Whts PCMM
4)About projects, ur roles
5) Explain the role of DPC
6) How will you rectify a bug if it happens
7) How will you set limits for bugs in your project
8) How will you make sure that the project is following the processes to prevent defects
01 WS-COUNT PC 9 VALUE 5
PERFORM XX-PARA WS-COUNT TMES
XX-PARA.
MOVE 10 TO WS-COUNT.
How many times will the XX-PARA get executed?
What is the maximum lenght of string that you can pass from JCL to COBOL?
What is the maximum levels possible in an MS database
What is the maximum number of segments poddible in an MS DB
How many modes you can open a file in COBOL
How do you refer back a dataset in a JCL step?
Good Luck Friends.
To recieve daily Job alerts in your email send a email to
iohnsonx-subscribe(yahoogroups.com or
click this link to visit the home page.... http://groups.yahoo.com/group/iohnsonx/
good collection oI ebooks in a cd visit http://users.cib.net/vics/
DB2
Precompile
Bind Process
Different types of columns / fields in DB2 tables
How to convert those fields into readable format
Cobol equivalent of Integer / Decimal (9,2) / Varchar
Group by / order by usage and scenarios
How to get unique values from a column of a table which has duplicate
values
Aggregate Functions of DB2 Sum Avg Max Min
How to retrieve max/min value from a table without using aggregate
functions
If a column is of 1000 bytes but the first 10 bytes has the name so how
can i re
The MOD will cause the Data Set to be created (if it does not exist), and then the
two DELETE will cause the Data Set to be deleted whether the step abends or not
This disposition is used to clear out a Data Set at the beginning of a job
8. What is the DD statement for a output File?
Unless allocated earlier, will have the following parameters:
DISP=(NEW,CATLG,DELETE), UNIT , SPACE & DCB
9. What do you do if you do not want to keep all the space allocated to
a Data Set?
Specify the parameter RLSE ( release ) in the SPACE. Eg: SPACE=(CYL,
(50,50),RLSE)
10. What is DISP=(NEW,PASS,DELETE)?
This is a new File and create it, if the step terminates normally, pass it to the
subsequent steps and if step abends, delete it This Data Set will not exist beyond
the JCL
11. How do you create a temporary Data Set? Where will you use them?
Temporary Data Sets can be created either by not specifying any DSNAME or by
specifying the temporary File indicator as in DSN=&&TEMP We use them to carry
the output of one step to another step in the same job The Data Set will not be
retained once the job completes
12. How do you restart a proc from a particular step?
In job card, specify RESTART=proc step step name where procstep = name of the
jcl step that invoked the proc and stepname = name of the proc step where you
want execution to start
13. How do you skip a particular step in a proc/JOB?
Can use either condition codes or use the jcl control statement IF (only in ESA
JCL)
14. A PROC has five steps Step 3 has a condition code How can you
override/nullify this condition code?
Provide the override on the EXEC stmt in the JCL as follows: //STEP001 EXEC
procname,CONDstepname=value All parameters on an EXEC stmt in the proc
such as COND, PARM have to be overridden like this
the comparison is true, the step is bypassed (If this answer confuses you,
welcome to the club - memorize it and don't ask questions!).
54. What is the improvement to COND= in the latest version of MVS?
MVS now allows for an IF bracketed by an END IF around any job step to replace
the COND= syntax Again, if the IF statement is true, the step is bypassed.
55. What is the purpose of the PARM keyword in the EXEC statement?
The value after the PARM= specifies control information to be passed to the
executing program of the job step
56. What is the purpose and meaning of the REGION keyword and what
JCL statement is it associated with?
REGION specifies the maximum CPU memory allocated for a particular job or job
step If REGION is in the JOB card, it relates to the entire job; if in the EXEC
statement, it relates to the job step .
57. What is the purpose and meaning of the TIME keyword and what JCL
statement is it associated with?
TIME specifies the maximum CPU time allocated for a particular job or job step If
TIME is in the JOB card, it relates to the entire job; if in the EXEC statement, it
relates to the job step.
58. What is the meaning of data definition name (DD name) and Data
Set name (DSN name) in the DD statement?
Data definition name is the eight character designation after the // of the DD
statement It matches the internal name specified in the steps executing program
In COBOL that's the name specified after the ASSIGN in the SELECT ASSIGN
statement Data Set name is the operating system (MVS) name for the File
59. How is the keyword DUMMY used in JCL?
For an output File DUMMY specifies that the output is to be discarded For input it
specifies that the File is empty.
60. What does the keyword DCB mean and what are some of the
keywords ?
associated IT DCB stands for data control block; it is a keyword for the DD
statement used to describe Data Sets Keywords associated with it are BLKSIZE,
DEN, LRECL and RECFM.
61. What is the difference between BLKSIZE and LRECL?
DISP (Disposition): The DISP parameter describes the status of a data set to the
system, what is to be done with the data set at the end of the job step, and what
to do with the data set if the step terminates abnormally DCB (Data control
black) : DCB=(LRECL=NN, BLKZIZE=YY,RECFM=Z,DSORG=MM) Z can be F, FB,
V, VB MM Can be PS (physical sequence) PO (partitioned) DSN (Data set name) :
UNIT : Identifies device of data set Space :
69. How is the Catalog procedure called from a JCL, if it is lying in your
own data sets ?
STEP1 EXEC PROC=PROC1 The library in which PROC1 is present should be
mentioned in PROCLIB.
70. What is the difference between the In-stream Procedure & Catalog
Procedure?
In-stream Procedures begin with a PROC stmt and must be terminated by a PEND
stmt. (PEND can also be coded for a cataloged Procedure, but it isnt required)
The PENC stmt coded as : //Option-name PEND comments The In-stream
Procedure is placed following the JOB statement of the JOB. Up to 15 In-stream
Procedures can be included in a single job. Each In-stream Procedure may be
invoked several times with in the job. //QZ5P13TD JOB (18636), HARISH,
CLASS=A //RUN PROC In-stream procedure starts from here //GO EXEC PGM=ONE
//SYSOUT DD SYSOUT=A //PEND //STEP1 EXEC RUN procedure is used like .. A set
of JCL stmts consisting of a PROC stmt and one or more EXEC and DD stmt
(steps), which is placed in a procedure library. It executed by an EXEC
(procedure) stmt in another data set (called the execution JCL). Advantages :
Saves time, prevents errors.
71. What is the Symbolic parameter?
What for it is needed? Where it is most commonly used?
Any parameter that can vary with each execution is a good candidate for
definition of a symbolic parameter. Use of symbolic parameter make the
procedure more flexible. This prevents the procedure to be modified each and
every time a small and recurring change is needed at a place. //DD1 DD
DSNAME=&SYSUID..PROFILE,DISP=(NEW,KEEP),
72. Can you explain the DISP Parameter in detail? What are the default
DISP Parameters?
a. Current Status NEW Default OLD exclusive SHR Simultaneously MOD b.
Normal Disposition KEEP Default if DISP = SHR, OLD, MOD DELETE Default if
DISP = NEW CATLG c. Abnormal Termination same as Normal Disposition
73. What is the difference between the Refer-back & Overriding
parameters?How are they coded in a JCL?
78. How many Maximum generations can be created for a GDG?> How
will you create a Generation data set ?
The maximum number of GDG versions that can be created is 255. A GDG data
set is created with (+1) appended to the name of the GDG base.
79. What is the E37 error?How will you resolve it with out losing a
single byte of data?
(Hint: This Error comes when you save the data set after editing it) Insufficient
Space.
80. What is SOC7 abend ?How do you resolve it?
Data Exception. Eliminate the bad data by debugging the program.
JCL QUESTIONS SET 2
Q: What are S0C1, S0C4, S0C5, S0C7 ABENDs??
A: S0C1 (Operation Exception Error) - May be due to
Missing or misspelled DD name
Read/Write to unopened dataset
Reading a dataset opened output mode
Writing into a dataset opened input mode
Called subprogram not found
S0C4 may be due to
Missing Select statement (during compile)
Bad Subscript/index
Protection Exception
Missing parameters on called subprogram
Read/Write to unopened file
Move data from/to unopened file;
S0C5 May be due to
Bad Subscript/index
Close an unopened dataset
Bad exit from a perform
Access to I/O area (FD) before read;
S0C7 may be due to
Numeric operation on non-numeric data
Un-initialized working storage
Coding past the maximum allowed subscript
S0CB might be due to 1.Division by Zero
Q: Why do you use a CONTROL CARD?
A: A CONTROL CARD can be a member of a PDS or a sequential dataset and is
used for storing the date fields, definitions of VSAM files etc., We use CONTROL
CARD because we cannot use an in-stream procedure in a procedure. Generally
you will be calling a PROC from your JCL and you cannot code instream
procedure in the PROC and so you will point to the dataset, which is called
controlcard.
Q: How do you submit JCL via a Cobol program?
A: In your JCL define as: //JOBA JOB 1111,JOB1 //STEP01 EXEC PGM=PROG1
//ddname DD SYSOUT=(*,INTRDR)....and your COBOL (PROG1) should look like
this: SELECT JCL-FILE ASSIGN TO ddname. Open this file and write the JCL
statements into this file. Example: MOVE '//TESTJOB JOB 1111,VISVEISH' TO JCLREC.MOVE '//STEP01 EXEC PGM=IEFBR14' TO JCL-REC.and close this file. Then
TESTJOB will be submitted.
Q: How do you submit a JCL under CICS environment?
A: Pass all the JCL codes to a COBOL variable (should be declared using OCCURS
clause) and then write the line one by one to the spool using CICS commands like
SPOOLClose, SPOOLOpen and SPOOLWrite. For more help refer CECI of CICS or
CICS manual.
Q: What is the parameter to be passed in the job card for the unlimited
time, irrespective of the job class
A: TIME=1440
Q: What is a GDG?
A: GDG - group of dataset that are logically or chronologically related, referred by
name and a relative generation number - an integer which identifies the
generation of a dataset and is coded in parentheses after dataset name.
Absolute GDG name - GxxxxVyy, where xxxx-absolute generation number, yyversion number. GDGs can be sequential, direct, partitioned. (VSAM - no). They
must always be cataloged. Advantages - all datasets have the same name and
system keeps track of adding new and retaining previous generations and
deleting oldest successive generation. To create a GDG we create a GDG index in
the system catalog with IDCAMS utility and then a model (prototype, DSCB) on
the same volume to supply DCB information. Empty - when limit is reached all
members are removed from the index, otherwise only oldest. Scratch-removed
members are uncataloged & deleted, otherwise - removed & uncataloged, but
remain in the system (not members of GDG any more). GDG number is updated
at the end of the job. If number is not specified all generations will be processed
from the beginning
Q: What do you mean by spooling?
A: This is managed by JES. This is used for Queuing the Outputs that are intended
for Printing and are first stored in SPOOLDASD.
Q: How many Instream-Procedures (PROCs) can be coded in a single
Job?
A: 15
Q: For how long a Job can be executed continuously on a Mainframe?
A: 248 DAYS
Q: How may divisions are there in JCL-COBOL?
A: SIX
Q: What is the Maximum number of DD Statements to be coded in a
single JCL
A: 3273
Q: How much space OS allocates when you create a PS or PDS?
A: 56 KB
Q: What is the minimum number of Dataset names (PDS) in one
Directory Block?
A: SIX
Q: What is the maximum number of steps in a Job?
A: 255
Q: How much is memory space involved, when we code BLOCKSIZE, TRK
& CYL
A: One block constitutes 32KB of formatted memory/ 42KB of Unformatted
memory; 6 blocks makes one Track & 15 Tracks makes one cylinder.
Q: What is DSNDB06?
A: This is the Place where DB2 Catalog resides;
Q: What is the use of DSNDB07?
A: This is the area where sorting takes place in DB2
Q: What is DATACOM DB?
A: It is a Database used with VSE.
Q: What is a Dummy Utility and what it does?
A: IEFBR14 is a Dummy utility and it is used for the sakeof EXEC PGM= ....
statement in JCL [when used it wouldnt perform any task]. e.g. While Allocating
a dataset you don't have to run any utility [this could be done by giving
disp=new in DD statment]. But for a PGM name must be given in EXEC statment,
it is used.
Q: What 3 guidelines do we have to follow when concatenating DD
statements?
A: The three guidelines for concatenating DD Statements are:- Datasets must be
of the same type (disk or tape) All datasets must have the same logical record
length (LRECL) The dataset with the largest blocksize must be listed first.
Q: On a DD statement, what is the main difference between creating a
new sequential flat file and a partitioned dataset?
A: SPACE= (n,m) for a sequential file, SPACE= (n,m,p) for a PDS where n, m, and
p are numbers. The p designates how many directory blocks to allocate.
Q: What is the difference between IEBGENER, IEBCOPY and REPRO in
IDCAMS utility?
A: They are the utility programs used in JCLs: IEBGENER : This utility is used for
copying sequential datasets which produces a PDS or a member from a
sequential dataset. IEBCOPY : This utility is used for copying one PDS to another
or to merge PDSs. REPRO : This is for copying sequential datasets. More or less
same as the IEBGENER
Q: What is the difference between STATIC CALL & DYNAMIC CALL
A: In the case of STATIC CALL, the called program is stand-alone and an
executable. During run time we can call it in our called program. In a DYNAMIC
CALL, the called program is not an executable program and it can executed
through the called program
Q: What is the difference between CATALOGED PROCEDURE and INSTREAM PROCEDURE?
A: INSTREAM PROCEDURES are set of JCL statements written between JOB and
EXEC statements, start with PROC and end with PEND statement. Mainly used to
test cataloged procedures. CATALOGED PROCEDURES are cataloged on the
procedure library (PROCLIB) and is called by specifying the procedure name on
the EXEC statement.
Q: Can we browse or edit the GDG dataset if it is a tape entry?
A: No
Q: What are the maximum and minimum sizes of any CONTROL AREA
(VSAM datasets)?
A: Minimum Size : 1 track; Maximum size : 1 cylinder
Q: How many parameters are there to a DISP statement and what are
their uses. ?
A: There are three (3) parameters: Parameter 1: Current data set disposition
(NEW, SHR,OLD,MOD) Parameter 2: Normal close action for data set (CATLG,
KEEP, DELETE) Parameter 3: Abend action for data set (CATLG, KEEP, DELETE)
Q: What is COMP?
A: COMP - HALF WORD BINARY
Q: What is a PROCEDURE?
A: A set of precoded JCL that can be modified through the use of parameters or
override cards. Note: Procedures can be catalogued or instream.
COBOL
Q:
A:
What are the three categories of data defined in the DATA division?
The file section (FD) information
Working storage information
Linkage section data definition
Q:
A:
Q:
A:
What are two of the more common forms of the EVALUATE statement?
The two most common forms of the EVALUATE statement are:
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.
EVALUATE VARIABLE-NAME checks multiple options for the TRUE condition
of a variable.
Q:
A:
Q:
A:
Q:
A:
Q:
A:
What is COBTEST?
COBTEST is a debugging tool for examining, monitoring and controlling VS
COBOL II programs in a test environment. Programs can be debugged
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 online.
Q:
A:
Q:
A:
Q:
A:
Can the logical structure of a file be changed once it has been created?
NO.
Q:
A:
Q:
A:
Q:
What is file organization relative?
A:
The position of each logical record in the file is determined by its relative
record number.
Q:
A:
Q:
A:
Q:
A:
Q:
A:
Q:
A:
Q:
A:
Q:
A:
Q:
A:
Q.
A.
Q.
A:
table with the keys of all other items in the table, each time moving the
item with the lowest key to the first items position. The process is
continued, starting with the second item, comparing it to the third item,
swapping pairs of items until the entire table is in order.
What is an inline perform?
COBOL II allows a performed procedure to be coded in-line .The perform
statement is coded without a paragraph name, followed directly by the
coded to be performed .An END-PERFORM statement is required and
coded at the end of an in-line perform.
PERFORM
- --
--- ---
END-PERFORM
Q.
How could 88 levels be used for validation of data for valid values and
valid ranges?
A:
The 88 level is used to specify the valid values and /or ranges of values,
and then the 88 data name is used in used in an if statement to test the
data.
Q.
Give an example of how you would code an 88 level?
A:
02 Input Location Picture 9(3).
88 Valid-Locations Values are 100,200 thru 299
Q.
How could 88levels be used to determine the next step in navigating
through a program?
A.
The 88-level data name can be used to specify a condition in both if and
evaluate statements.
IF Valid-Locations
Perform Para-A
End-if
Q.
A:
Evaluate true
When Valid Locations
Perform Para-A
When other
Perform Para-B
End Evaluate
What does the COBOL CANCEL statement do/?
The CANCEL statement ensures that the next time the referenced subprogram is called it will be entered in its original state.
Q.
A:
Q.
A.
A.
The answer will use 3 bytes (4+1)/(5/2)=2.5 or 30, so a leading 0 will pad the answer :
01234F.
Q.
What are binary numbers?
A. Binary numbers are strings of 0s and 1s, which are stored in half word, full
word, or double word, depending on the size of the number.
Up to 4 digits are stored in 2 bytes or a half word.
5-9 digits are stored in 4bytes or a word.
10-18 digits are stored in 8 bytes or a double word
Q.
A.
Q.
A.
14. What happens when you open an empty VSAM file in a COBOL program for
input?
A VSAM file that has never contained a record is treated as unavailable. Attempting to
open for input will fail. An empty file can be opened for output only. When you open for
output, COBOL will write a dummy record to the file & then delete it out.
15. How do you initialize a VSAM file before any operation? a VSAM with
alternate index?
Can write a dummy program that just opens the file for output & then closes it.
16. What does a file status of 02 on a VSAM indicate?
Duplicate alternate key . Happens on both input and output operation
17. How do you calculate record size of an alternate cluster? Give your values
for both unique and non-unique.
Unique Case: 5 + ( alt-key-length + primary-key )
Nonunique Case: 5 + ( alt-key-length + n * primary-key )
where n = # of duplicate records for the alternate key
26. Assuming that the DEFINE jcl is not available, how do you get info about a
VSAM files organisation ?
Use the LISTCAT command.
27. During processing of a VSAM file, some system error occurs and it is
subsequently unusable . What do you do ?
Run VERIFY.
NOTES
Compare JCL:
//SUPERC EXEC PGM=ISRSUPC,
//
PARM=(DELTAL,LINECMP,
//
'',
//
'')
//NEWDD DD DSN=BST.TEST.SOURCE(BSTS010),DISP=SHR
//OLDDD DD DSN=BST.PROD.SOURCE(BSTS010),DISP=SHR
//OUTDD DD DSN=BST.TEST.COMPARE(BSTS010),
//
DISP=(NEW,CATLG),UNIT=SYSDA,
//
SPACE=(13566,(50,100,5)),
//
DCB=(BLKSIZE=13566)
//SYSIN DD *
CMPCOLM 7:72
/*
To find out how many initiators are available and what are the classes they can handle?
+ WS-EMP-BONUS
','
','
','
','
The instruction at the Offset 36A is failed. So look into the compilation listing for the
statement that is in the offset 36A.
000021 MOVE
000358 D207 2016 A0BD
000022 COMPUTE
00035E F247 D0F8 201E
MVC
22(8,2),189(10)
(BLW=0)+22
PGMLIT AT +185
PACK
248(5,13),30(8,2)
TS2=0
WS-EMP-BONUS
000364 D20F
00036A FA54
000370 940F
000374 F844
00037A F374
000023 DISPLAY
D0E8
D0F2
D0F3
D0F3
2026
A08D
D0F8
D0F3
D0F3
MVC
AP
NI
ZAP
UNPK
232(16,13),141(10)
242(6,13),248(5,13)
243(13),X'0F'
243(5,13),243(5,13)
38(8,2),243(5,13)
TS1=0
TS1=10
TS1=11
TS1=11
WS-EMP-CTC
PGMLIT AT +137
TS2=0
TS1=11
TS1=11
000022
BONUS
000023
MOVE
60000
TO WS-EMP-SAL
So one of this field referred in this statement has junk in it. Just before compute we
populated WS-EMP-SAL and so there is a problem with WS-EMP-BONUS. If you go thru
the code, you will find the developer missed to populate/initialize WS-EMP-BONUS and
that has caused data exception.
If these fields are from file, we cannot easily confirm like above. So we have to give
display for these two fields in the program and rerun the program or look for junks in the
source file for these two fields using FILE AID/ INSYNC.
If you know how to read dump, then you get the values of these fields from dump. How?
Look into the data division map in the compilation list for these two fileds.
0Source
Hierarchy and
Base
Hex-Displacement Asmblr
Data
Data Def
LineID
Data Name
Locator
Blk
Structure
Definition
Data Type
Attributes
2 PROGRAM-ID SANSOFT---------------------------------------------------------*
8
1 WS-VARIABLES. . . . . . BLW=00000 000
DS 0CL46
Group
9
2 WS-EMP-NAME . . . . . BLW=00000 000
0 000 000
DS 10C
Display
10
2 WS-EMP-AGE. . . . . . BLW=00000 00A
0 000 00A
DS 2C
Disp-Num
11
2 WS-EMP-CITY . . . . . BLW=00000 00C
0 000 00C
DS 10C
Display
12
2 WS-EMP-SAL. . . . . . BLW=00000 016
0 000 016
DS 8C
Disp-Num
13
2 WS-EMP-BONUS. . . . . BLW=00000 01E
0 000 01E
DS 8C
Disp-Num
14
2 WS-EMP-CTC. . . . . . BLW=00000 026
0 000 026
DS 8C
Disp-Num
D4E4E3C8
C8E84040
|MUTHU
+000020 279890D8 00000000
00000000
|................................|
So if there are million records in a file and during the processing it abended after
n number of records, to identify the record caused problem, read the dump for the file
section unique variable(s) values and look for the respective record in the file and
analyse/correct/delete.
We have taken offset directly from sysout. If it is not available, then refer the
PSW. Based on AMODE 24/31, the last 24/31 bits contain the next sequential instruction
to be executed. From this value, subtract the entry point of the program being abended
and that will give you offset. One instruction above this offset is the one that caused the
abend. Entry point of all the programs executed be found in trace back or save trace
section of the dump. You can directly found the offset in the traceback also. (last 31 bits
of A7901180 is 27901180, 27901180-27900E10 = 370 is the offset, from the
compilation listing one instruction just before 370 is 36A.)
PSW..... 078D1000 A7901180
Traceback:
DSA Addr
0001D120
0001D018
Program Unit
CEEHDSP
SANSOFT
Statement
PU Addr
057780F0
27900E10
PU Offset
+00003C34
+0000036A
Load Mod
Service
Status
CEEPLPKA
SANSOFT
UK00165
Call
Exception
Entry
CEEHDSP
SANSOFT
E Addr
057780F0
27900E10
E Offset
+00003C34
+0000036A
HCL Technologies offers world class technology solutions for the emerging network centric world.
It provides a range of technology and software engineering services including Technology
Development Services, Software Engineering Services, Application Engineering Services,
Networking Services .
These services are predicated on a rich technology heritage. Experience with the development
and application of technologies like Internet and E-Commerce, Embedded software, Networking
and telecom protocols, VLSI design etc.
Skills on a wide variety of computing platforms from Open Systems to Enterprise Servers based
on mainframes expertise, object oriented and legacy system architecture, methodologies in
addition to distinguished R&D background uniquely positions us as a preferred provider of
technology and software engineering services in the emerging network centric world.
HCL Technologies has established dedicated offshore software factories with clients such as
Bankers Trust (Australia), Lexis Nexis (US) , Southern California Edison (US), A Networking
Major (US)
HCL Technologies operates through 29 offices in 14 countries in United States, Europe, Japan,
Asia Pacific
The company employs 3300 IT professionals worldwide.
HCL Technologies holds 100% stake in Intelicent (former HCL James Martin Inc.), a US based
methodology consulting led Services Company. The company also has a 100% subsidiary in
India, HCL Comnet Systems and Services Ltd, which provides networking services.