Thursday, March 10, 2011
Tuesday, February 22, 2011
C0bol Interview Questions & Answers
1. Program name: P1.
Load library: TRGF99.COBOL.LOADLIB
Input File: TRGF99.FILE1
Output File: TRGF99.OUTFILE
//JOB1 JOB 124
//STEP01 EXEC PGM=P1
//STEPLIB DD DSN=TRGF99.COBOL.LOADLIB1,DISP=SHR
//INFILE DD DSN=TRGF99.FILE1,DISP=SHR
//OUTFILE DD DSN=TRGF99.OUTFILE,DISP=MOD
In the above scenario, if we execute the above program which one of the following errors we get?
a) S806 b)SE37 c)S0C4 d)S0C7
2. If ‘MAINPGM’ is a COBOL program that calls another program ‘LINKPGM’ and passes a value say, ‘10’, that value will be accepted by another variable in link program. Where that variable is declared?
a) Working Storage Section of MAINPGM
b) Linkage Section of MAINPGM
c) Linkage Section of LINKPGM
d) Working Storage Section of LINKPGM
e) Both b & d
3. A file attribute mismatch was encountered. Which of the following status code is related to the above message?
a)35 b)39 c)46 d)90
4. Which of the following divisions are mandatory
i) IDENTIFICATION
ii) ENVIRONMENT
iii) DATA
iv) PROCEDURE
a) i only b) i & ii c) iv only d) i & iv e) iii & iv
5. 01 WS-ABC PIC X.
88 FOUND VALUE ‘Y’.
88 NOT-FOUND VALUE ‘N’.
What is the error in the above code?
a) PIC clause is missing in the FOUND declaration.
b) PIC clause is missing in the NOT-FOUND declaration.
c) 88 level variables are declared in Area-A.
d) 01 level variable is declared in Area-A.
6. Every file entry in the File Control should have a description in the File Section.
a) True b) False
7. IF A>B
IF A>C
DISPLAY ‘A’
NEXT SENTENCE
END-IF
DISPLAY ‘C’
END-IF.
DISPLAY ‘B’.
If A=10, B=5, C=7. What is the output?
a) A C B b) A B c) B d) C B
8. What is the statement that is used to stop the execution of the program?
a) GOBACK b) EXIT c) STOP RUN d) EXIT
9. MAIN-PARA
DISPLAY ‘IN MAIN-PARA’.
PERFORM PARA1 THRU PARA2.
STOP RUN.
PARA1.
DISPLAY ‘IN PARA1’.
PARA3.
DISPLAY ‘IN PARA3’.
PARA2.
DISPLAY ‘IN PARA2’.
Assume that the above code is in the PROCEDURE DIVISION of a COBOL program. If the above program is executed, what is the output?
a) IN MAIN-PARA b) IN MAIN-PARA c) IN MAIN-PARA
IN PARA1   IN PARA1   IN PARA1
IN PARA2   IN PARA3   IN PARA2
IN PARA2   IN PARA3
d) Compilation Error as Para-names are not declared in a proper order.
10. Can we move a variable containing Alphanumeric value to a variable containing Numeric value?
a) Yes b) No
11. How many bytes are required to store data internally for a variable defined as PIC 9(7)V99 USAGE COMP-3.
a) 4 b) 5 c) 6 d) 9
12. Find the number of bytes which will be stored in the variable EMP-RECORD
01 EMP-RECORD.
02 EMP-DATA1.
03 EMP-NAME PIC X(10).
03 EMP-SAL PIC 9(04).
02 EMP-DATA2 REDEFINES EMP-DATA1.
03 EMP-N1 PIC X(12).
03 EMP-N2 PIC 9(02).
02 EMP-DATA3.
03 DEPT1 PIC X(02).
03 DEPT2 PIC X(02).
a) 14 b) 16 c) 18 d) 32
13. A PIC 9(2)V9(3) VALUE 10.121
B PIC 9(2) VALUE 12
C PIC 9(2)V99 VALUE 11.23
What will be the value in C after the following statement is executed
ADD A, B GIVING C ROUNDED
a) 22.121 b) 22.12 c) 22.13 d) 11.23
Tuesday, November 16, 2010
JCL ABENDS
1)SOC 1 ==>Misspeld of DD statement/Suscript Error.
2)SOC 4 ==>Storage protection Error.When your pgm is trying to store the data in memory that is not allocated.
3)SOC 7==>If u r trying to move the Numeric data into the NON-Numeric Field.
4)S222 ==> Operater cancelld the job,It may be improperly accessing a magnetic tape.
5)S322===>Time Out error.Due to the end less loop in your program.STEP time exceeded.
6)S522===>Time out error. JOB time exceeded than the specified time.
7)S804===>It is due to the lack of virtual storage.Increase the region parameter.
8)S806===>is an error that usually means you are not able to load or link in another
module.
9) SB37==>End of the volume,no furthur volumes are specified.
10)SD37==>Secondary space not specified,primery space filled.
11)SE37==>Both primary and secondary space filled.
Thursday, October 28, 2010
SMF
MVS CONSOLE COMMANDS
Wednesday, October 27, 2010
CA-7 COMMANDS
2)LIST
3)XQM,JOB=JOBNAME
4)LJOB,JOB=JOBNAME,LIST=ALL
5)LJOB,JOB=JOBNAME,LIST=NODD
6)LJOB,JOB=JOBNAME,LIST=TRIG
7)LJOB,JOB=JOBNAME,LIST=DEPJ
8)DEMANDH,JOB=JOBNAME
9)RUNH,JOB=JOBNAME
10)FSTRUC,JOB=JOBNAME,SCHID=NNN
11)FRJOB,JOB=JOBNAME
12)LPRRN,JOB=JOBNAME
13)LRLOG,JOB=JOBNAME,DATE=*
14)DEMAND,JOB=JOBNAME,SET=NTR
15)DEMAND,JOB=JOBNAME,SET=SKIP
16)LSCHD,JOB=JONAME,LIST=CALS
17)LPDS,DSN=DATASETNAME,MEM=MEMBERNAME
18)HOLD,JOB=JOBNUMBER
19)LJCL,JOB=JOBNAME
20)/DISPLY,ST=JCL
21)/DISPLAY,Q=ALL
22)START,Q=ALL
23)STOP,Q=ALL