-
How many bytes occupied following comp example?
Dear Friends,
This is regarding COBOL comp.
PIC X(3) occupy the 3 bytes... but PIC 9(3)V9(7) COMP occupied how much bytes?
I said in interview that 10/2 = 5 bytes. V is specified for decimal point.
Is that correct? But interviewer looked at me differently when I said this answer?
If you are more confident, please reply this ...thanks... -
In the example below
05 WS-VAR1 PIC X(5),05 WS-VAR2 REDEFINES WA-VAR1 PIC 9(5),PROCEDURE DIVISION MOVE 'ABCDE' TO WS-VAR1.Now what is the value of WS-VAR1 and WS-VAR2 ?
-
-
-
Redefine
What is redefine in COBOL?
-
-
Concatinating two rec by using COBOL & JCL
I need to concatenate records by using cobol and jcl (both) as follows.
Input File:
AAAAA
BBBBB
CCCCC
DDDDD
11111
22222
33333
44444
Split the file into two halves and
1st rec of first half and 2nd rec of second half records are concatinated and
2nd rec of first half and 2nd rec of second half records are... -
How to separate to multi-field?
For example:
01 something PIC X(06).
01 one PIC 9(02).
01 two PIC 9(02).
01 three PIC X(02).
SELECT socket(:number)
INTO :something
FROM DUAL
result:
something = 1234ww
one = 12
two = 34
three = ww -
What is the difference between NEXT SENTENCE and CONTINUE?
NEXT SENTENCE gives control to the verb following the next period. CONTINUE gives control to the next verb after the explicit scope terminator. (This is not one of COBOL II's finer implementations). It's safest to use CONTINUE rather than NEXT SENTENCE in COBOL II.
-
Ascending Order String Handling
Given a string for eg: MICROSOFT, How can you arrange each letter in this string in an ascending order?
-
Called and calling program for cobol with cursor
I have program A which is calling B first time. B program is feaching data using cursor , but some mess happened and the control went back to pro A without closing cursor . Once again program A called program B then what will happen to cursor. will program fetch the data.
-
EMail Validation via COBOL
I have file with customer details and I need to process only those records who is having valid email id, so how we can validated these records using COBOL?
-
-
-
-
-
COBOL File Handling
how do you read a file in reverse order through COBOL program?
-
-
What is the difference between static & dynamic call?
In the case of static call the mainprogram and subpgms r loaded into the mainmemory initially.in the case of dynamic call only the mainpgm is loaded first and the subpgm is loaded only when a call to it is made.so the memory utilization is good in dynamic call.
-
Dynamic Linking in COBOL
I have two modules called 'A' and 'B'. Module 'A' opens the ORACLE database connection, and Calls 'B', which queries the database using the 'SELECT' statement.When I hard code the module name during CALL, the called module uses the database connection opened in the module 'A'. Pls refer below:CALL "B"But, when I moved the module name into a variable and try to call the module, as belowMOVE "B" TO...
COBOL Interview Questions
Ans