Consider the following COBOL entries:
05 X PIC 99 VALUE 10.
SUBTRACT 20 FROM X.
The resultant value of X wil be
Answers were Sorted based on User's Feedback
Answer / sayan
since no sign clause is mentioned, the minus sign is
ignored and the resultant value of X will be 10.
Is This Answer Correct ? | 16 Yes | 1 No |
Answer / rajiv gupta
Answeer would be 10. as 20 -10 should be -10 but X is not
declared as signed variable as S9(2)so answer is 10.
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / swappy
Answer #3 is correct. Since there is no sign clause it will
just ignore the -ve sign and resultant will be 10.
Also Prabhu, there is no problem with the level no. There
will not be any error due to the level no.
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / madhu
x=x-20 will be -10
Since there is a -ve sign in the beginning it'll be stored
on top of the last digit. So -0 = }.
Then ans will be 1}
Is This Answer Correct ? | 4 Yes | 4 No |
Answer / prabhu shankar
If u see the level number itself u can able to say that it
will show error. Because PIC will have the level number 77
and not like 01,02,03.
So it show the error only.Wll not exucute.
I think so. If any wrong plz apologise me.
Is This Answer Correct ? | 1 Yes | 7 No |
i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCDEFGHIJKLMNOPQRESTUVWXYZ ' 05 WS-B REDEFINES WS-A 10 WS-B1 PIC X(10). 10 WS-B2 PIC 9(10). 10 WS-B3 PIC X(10). If I Display B1, B2 and B3 respectively, what is the value displayed in B2
what is the minimum number of lines a Cobol program should have to successfully compile and run
11 Answers ABC, Societe Generale,
How include time & date in the report generation in cobol programing?
Describe the cobol database components?
Explain call by context by comparing it to other calls.
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
what is mainframe? what is the mainframe software ? what is use in s/w field?
where did you see the information regarding abend codes in jcl?
What is the difference between Global and External Variables?
What will happen if we try to create GDG (+2) generaton instead of (+1) generation?
How to print 10 to 1 if the input have only 10 digit number?
whn do i get soc7 abend while moving alphanumeric to numeric or while moving numeric to aplhanumeric please reply ASAP?