I was asked in HSBC interview following questions:
1. A string was given " techincal seminar on cobol language"
Interviewer asked me to calculate the number of vowels in
this string.
Answers were Sorted based on User's Feedback
Answer / sakthi
INSPECT strng-1 TALLYING strng-2 FOR ALL 'A','E','I','O','U'.
| Is This Answer Correct ? | 40 Yes | 3 No |
Answer / srini
INSPECT strng-1 TALLYING count strng-2 FOR ALL 'A','E','I','O','U'.
| Is This Answer Correct ? | 10 Yes | 4 No |
Answer / ameen
here is an example for counting vowles in apple word..
apply the same code for your required string....
01 str pic a(5) value 'apple'.
77 cnt pic 9(1) value 0.
01 i pic 9(1) value 1.
procedure division.
perform varying i from 1 by 1 until i>5.
if str(i:1)="A" or "a".......write all vowels.
add+1 to cnt.
display cnt.
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / sridevi mj
We can use the built in function: % SCAN .
We compare the text given with the vowel set.
Get the poitions and then get to know how manvy vowels are
there.
| Is This Answer Correct ? | 0 Yes | 0 No |
what are the two ways of breaking a cpu bound process to allow other task to gain access to cpu?
What?s the CICS command used to access current date and time?
Can you have CICS code in a copybook? If yes, what happens during compilation?
Explain the thress bms options?
Define TCT.
Can you define mapset?
In a particular cics program, what is the procedure to allocate dynamic memory?
What is the abend command?
How do you set the MDT option to ?ON? status, even if data is not entered?
Explain the term ?MRO? (Multi Region Operation)?
<CICSFault xmlns="http://www.ibm.com/software/htp/cics/WSFault">DFHPI10 08 05/13/2009 05:47:14 FSCIBM SOAP message generation failed because of incorrect input (INPUT_STRUCTURE_TOO_SMALL ).</CICSFault> Can anyone suggest how to handle this type of error?
What is the difference between the XCTL and LINK commands?