Clarification with concepts



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Clarification with concepts

Postby gowthamgyaa » Fri Oct 26, 2012 10:21 pm

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.
gowthamgyaa
 
Posts: 101
Joined: Wed Sep 05, 2012 11:18 pm
Has thanked: 67 times
Been thanked: 0 time

Re: Clarification with concepts

Postby Akatsukami » Fri Oct 26, 2012 10:26 pm

These should be in the "Interview Questions" forum, shouldn't they?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Clarification with concepts

Postby gowthamgyaa » Fri Oct 26, 2012 10:41 pm

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
gowthamgyaa
 
Posts: 101
Joined: Wed Sep 05, 2012 11:18 pm
Has thanked: 67 times
Been thanked: 0 time

Re: Clarification with concepts

Postby Robert Sample » Fri Oct 26, 2012 10:54 pm

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.

These users thanked the author Robert Sample for the post:
gowthamgyaa (Fri Oct 26, 2012 11:39 pm)
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Clarification with concepts

Postby gowthamgyaa » Sat Oct 27, 2012 12:14 am

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
gowthamgyaa
 
Posts: 101
Joined: Wed Sep 05, 2012 11:18 pm
Has thanked: 67 times
Been thanked: 0 time

Re: Clarification with concepts

Postby BillyBoyo » Sat Oct 27, 2012 12:37 am

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.

These users thanked the author BillyBoyo for the post:
gowthamgyaa (Sat Oct 27, 2012 4:19 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post