prasanna


{ City } chennai
< Country > india
* Profession * software associate
User No # 18563
Total Questions Posted # 3
Total Answers Posted # 13

Total Answers Posted for My Questions # 28
Total Views for My Questions # 55144

Users Marked my Answers as Correct # 86
Users Marked my Answers as Wrong # 50
Questions / { prasanna }
Questions Answers Category Views Company eMail

How to insert values for variables that are declared as COMP-3 variables in COBOL program in an already created VSAM file.

3 VSAM 8010

What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(9) VALUE SPACES. 01 WS-VARN REDEFINES WS-VARX PIC 9(9).

8 COBOL 9540

how to create a new pds with the structure of an existing pds?

Cap Gemini, IBM,

17 MVS 37594




Answers / { prasanna }

Question { TCS, 5480 }

study the data discriptions and answer the questions given below
i)01 ORDER RECORD
05 OUT-HEADER PIC X(50)
05 ITEM-COUNT PIC 99
05 OUT-ITEM PIC X(20) OCCURS 1 TO 20 DEPENDING
ON ITEM-COUNT
ii)01 NAME-AND-ADDRESS
05 N-AND-A-LINE OCCURES 5
05 LINE-LENGTH PIC P9
05 N-AND-A-CHAR PIC X OCCURS 1 TO 20 DEPENDING ON
LINE-LENGTH
iii)01 SALES-LIST
05 SALESMAN-COUNT PIC 99
05 SALES PIC 9(6) OCCURS 1 TO 100
DEPENDING ON
SALESMAN-COUNT
iv)01 ORDER-RECORD
05 NO-OF-BRANDS PIC 99
05 BRAND-PURCHASED OCCURS 1 TO 15 DEPENDING ON
NO-OF-BRANDS
which of the following is true?
a.i) and iii) are valid
b.i) and iv) are valid
c.i) and iii) are not valid
d.all are valid


Answer

ORDER RECORD is not a valid declaration fo a group item. It
has to be ORDER-RECORD.

Is This Answer Correct ?    0 Yes 0 No

Question { TCS, 7319 }

Consider the following:

77 A PIC 9(10)
77 B PIC 9(10)
77 C PIC 9(19)

MULTIPLY AB BY B GIVING C

Which of the following is true ?

(a) The execution of the above may result in size error.
(b) The execution of the above will result in size error.
(c) The definition of C is invalid resulting in compilation
error.
(d) No error will be thee and the program would proceed
correctly.


Answer

A and B are two different variables and there is no
variable declared as AB. Do COBOL has enough knowledge to
identify and multiply the vaiable A and the variable B,
then by B giving the result in C. I don't think so.

Kindly correct me if I am wrong..

Is This Answer Correct ?    7 Yes 1 No


Question { TCS, 6111 }

Identify the invalid dataname from the following:
(A) savings-account
(B) annual-allocation-for-overhead
(C) samount250
(D) 12demand


Answer

The answer is B because of the field restriction in COBOL..
only 8 chars are allowed..



Cporrect me if i am wrong

Is This Answer Correct ?    0 Yes 17 No

Question { Accenture, 6912 }

If a=1 or 2 or 3 NEXT SENTENCE
ELSE move a to b.
a) if A not = 1 or 2 or 3 move A to B
b) if not A = 1 and 2 and 3 move A to B
c) if A Not = 1 and 2 and 3 move A to B
d) if A NOT = 1 or NOT=2 or NOT =3 move A to B


Answer

The answer should be 'D'.

Hi Basavaraj,

FYI, AND operator is used in between the variables in
option c. But in the question it is OR operator and so
correct your answer. thanks

Is This Answer Correct ?    4 Yes 4 No

Question { 5848 }

What is the procedure for running the batch job in
mainframe?


Answer

see wheather any online file is running at that instance. I
f it is running wait till it gets completed. Then, close
the online job. run the batch job and after again open the
online job

Is This Answer Correct ?    1 Yes 4 No

Question { Xansa, 9512 }

I want to increse the size of one existing dataset, can
anyone tell me the TSO command throgh that I can edit it.


Answer

Datasets once allcated cant be changed. If you want a
dataset of bigger size, create a new dataset of required
size, copy the older one to the newer and delete the older
one.

Is This Answer Correct ?    2 Yes 1 No

Question { Xansa, 6880 }

Attended Xansa Interview , Asked Questions :

1) Diff between Renames and Redefines
2) Comp and Comp -3
3) What will happen if DISP = ( NEW, DELETE, KEEP)
4) Gave one scenario like , if PIC clause X(50) has to be
increased to X(70) how u will proceed with this change.
5) Diff between Section and Paragraph


Answer

1. RENAMES just renames the variable whereas REDEFINES can
give a new definition to a variable and can also rename it.
No one is using RENAMES claus e nowadays..

2. COMP is numeric data represented in Binary, number must
be a positive integer. bytes vary from 2 to 8 depending on
th e PIC clause. COMP-3 is variable declared in packed
decimal form. Each digit will take half a bit of storage.
sign is stored seperately regardless of S specified

3. Will create a dummy dataset.

4. In COBOL the variable declaration is restricted to 30
and so, it 'll result in an error. For theory sake, one can
use REDEFINE clause.

5. Variables are declared in SECTION and are used in
PARAGRAPHS..

Is This Answer Correct ?    4 Yes 5 No

Question { TCS, 15369 }

what is the basic concept of mainframe? what knowledge is
needed for learn this mainframe?


Answer

Structured Programming concept is the basic concept of main
frames and one can learn it if he has good analtical skills

Is This Answer Correct ?    46 Yes 8 No

Question { 5833 }

how to change pic of variables declared in copy book
inside progrm?


Answer

REPLACE verb is used to change the name of the varriable
and not the PIC clause..

I think the only way is to REDEFINE it in the program..

Is This Answer Correct ?    6 Yes 0 No

Question { 8010 }

How to insert values for variables that are declared as
COMP-3 variables in COBOL program in an already created
VSAM file.


Answer

thats gr8. consider this situation. Since i am using COMP-3
variables, i have allocated only 10 bytes while i created
VSAM. But then i want to edit variables of 20 bytes. How to
then?

Is This Answer Correct ?    1 Yes 0 No

Question { 9540 }

What will happen if a variable is declared as below..
Explain with an example?

Working storage section:-
01 WS-VARX PIC X(9) VALUE SPACES.
01 WS-VARN REDEFINES WS-VARX PIC 9(9).


Answer

Wont it show SOC or ASRA because of the data exception...
(non numeric in a numeric field) ??

Is This Answer Correct ?    2 Yes 5 No

Question { Cap Gemini, 37594 }

how to create a new pds with the structure of an existing
pds?


Answer

You can create a new pds with file aid 3.2.
Here the question is, same structure of an existing pds.
it is easy to note down the structure and type it again
while allocating a daataset, but what is the shortest form
of doing this is the question...

Is This Answer Correct ?    6 Yes 4 No

Question { Cap Gemini, 37594 }

how to create a new pds with the structure of an existing
pds?


Answer

I got the answer. You have to use file AID f33 before the
existing Pds name

Is This Answer Correct ?    7 Yes 1 No