View previous topic :: View next topic
|
Author |
Message |
dass dasari
New User
Joined: 14 Mar 2010 Posts: 2 Location: Hyderabad
|
|
|
|
1. How do you convert lowercase characters to uppercase in COBOL?
My answer:
1. Using INSPECT as follows
INSPECT string1 CONVERTING
"ABCDEFGHIJKLMNOPQRSTUVWXYZ” TO “abcdefghijklmnopqrstuvwxyz"
2. You can use Intrinsic function LOWER-CASE() as follows...
Move "UPPERCASE DATA" TO String1.
MOVE FUNCTION LOWER-CASE(String1) TO String2.
DISPLAY String2.
2. There is a VSAM file with variable length how can you split it up. The file has data delimited by commas
Answer: Please help me with the answer.
3. Syntax for COND code:
COND(COMPARISON CODE,RELATIONAL OPRATOR,RETURN-CODE)
4. What abend will you get if you move LOW-VALUES to a key field?
Answer: SOC7 I guess.
5. If my program has 5 STOP RUN's what will happen if first STOP RUN executes?
Answer: I said control will come to O/S irrespective of number of stop runs below it.. is this the correct answer? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
1. Your answer and the question do not agree with one another. The question asks about converting TO upper case, your answer converts FROM upper case.
2. Are you saying the VSAM file has commas in the data records? If so, you can use INSPECT or reference modification to find each comma and use that to split the record up.
3. Your answer is not right -- COND=(stepname or procsteprefernce,relational operator,condition code)
4. Depending upon what the key looks like, you may get no abend, a S0C7 abend, duplicate record on write, or successful write -- with the little bit of data provided, there's no way to say which of these would apply -- assuming the question was about writing and not reading records (but the same answers would still apply, just worded slightly differently).
5. STOP RUN means stop run -- the first one executed stops the program, no matter how many are in the code nor where they are located. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
dass dasari wrote: |
2. There is a VSAM file with variable length how can you split it up. The file has data delimited by commas |
What did the interviewer mean by "split it up"? Under what context is this question (by that, I mean is it a question about storage management and VSAM files, or does it concern application design and programming, or do you think there was some other context to this)? |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Correct Cond paramter:
COND=(Compare Code,Rel Operator,previous stepname)
COND=(Compare Code,Rel Operator)
COND=(EVEN|ONLY) |
|
Back to top |
|
|
|