Page 1 of 1

Clarification with concepts

PostPosted: Fri Oct 26, 2012 10:21 pm
by gowthamgyaa
Hi everyone,
I have a series of Questions in which i need some clarity.
Kindly guide me to get knowledge in the following.

1. The following combination of edit characters can appear in the same PIC clause Except
a. -$*
b. $CR
c. $Z9
d. -$CR
e. -$Z9

I have completely no Idea with the above , I know its an edited characters and its uses individually ,but cant get anything related to above question.


2. To describe a record the level numbers may be chosen from
1. 01 to 77
2. 01 to 49 and 77
3. all odd numbers from 01 to 49
4. 01 to 49

I think we can use 01 to 49 and 77 to describe a record , if anything wrong guide me.


3. Indicate which one the following is not a valid combination of a SORT verb
(1) USING …….. GIVING
(2) USING …….. INPUT PROCEDURE
(3) USING …….. OUTPUT PROCEDURE
(4) INPUT PROCEDURE ….. OUTPUT PROCEDURE

I know 1st option is valid but I have no idea about other 3 options , kindly tel me what may be correct and how?


4. If the OVER FLOW option is not used in a STRING statement and the overflow condition occurs, the STRING operation is terminated.
(1) True
(2) False

I think the Answer is true, anything wrong in that kindly correct me.


Kind regards
gyaa.

Re: Clarification with concepts

PostPosted: Fri Oct 26, 2012 10:26 pm
by Akatsukami
These should be in the "Interview Questions" forum, shouldn't they?

Re: Clarification with concepts

PostPosted: Fri Oct 26, 2012 10:41 pm
by gowthamgyaa
Hi ,
Since i need to get concepts with cobol i think this is right place , If i post the same in Interview que forum they will provide me lly answers not the knowledge as provided here.

Kind regards
gyaa

Re: Clarification with concepts

PostPosted: Fri Oct 26, 2012 10:54 pm
by Robert Sample
There is a link to IBM Manuals on the top right side of this page. A diligent student of COBOL would have clicked on that link, opened the Enterprise COBOL Language Reference manual, and answered all of these questions without any requirement to post anything. The fact that you did not do so does not bode well for your future career in COBOL. Since I'm waiting for a long program to finish running, here's some help for you:
1. Section 5.3.12.1 of the manual has the title Symbols used in the PICTURE clause and it even has a table that shows valid combinations of the various symbols. This will allow you to answer the first question.
2. If "record" means a FILE SECTION definition, then your answer is wrong. If "record" means a WORKING-STORAGE SECTION definition, then your answer is right. Since COBOL normally refers to "records" only in association with files, I would say your answer is wrong.
3. Section 6.2.34 of the manual discusses the SORT verb and its options. Hint: there are two ways to specify SORT input, and two ways to specify SORT output. One of the four options uses both ways for either input or output.
4. Section 6.2.37 of the manual discusses the STRING verb. Section 6.2.37.3 on Data Flow discusses under what conditions the STRING terminates.

Re: Clarification with concepts

PostPosted: Sat Oct 27, 2012 12:14 am
by gowthamgyaa
there are two ways to specify SORT input, and two ways to specify SORT output. One of the four options uses both ways for either input or output.



Hi Robert,
I learned what might be the correct option in all the que. except SORT. I referred to manual also but still not clear, can you pls brief me.


Kind regards
gyaa

Re: Clarification with concepts

PostPosted: Sat Oct 27, 2012 12:37 am
by BillyBoyo
There is an explanation of the syntax diagrams at the start of the manual.

Try out the combinations, you have four things (USING, INPUT, GIVING, OUTPUT), in a simple program and see what compiles. Then refer to the syntax diagram and the the documentation (language reference and programming guide) to fully understand, given your discovery of what works and what does not, what the manuals are telling you.