IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

COBOL & VSAM Interview questions


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ikumar

New User


Joined: 02 Aug 2005
Posts: 81

PostPosted: Fri Sep 09, 2005 4:05 pm
Reply with quote

I do not have mainfrmae access to try...please let me know the answers.

1) Can we display the condition variables using DISPLAY statement. I mean the variables declared with 88 Level?

2) Which represents the end of the SECTION in COBOL program. Like EXIT represents the end of the paragraph.

3) is it mandatory to code EXIT at the end of the paragraph?

4) what is the difference between Array and the Table in COBOL. I assume both are same, is this correct?

5) In VSAM KSDS, I have an alternate key and also there are duplicates in the alternate key. so i define in the FD section as
ALTERNATE KEY IS variable-name WITH DUPLICATES.
is this correct? Is anything else need to code extra in the JCL to represent the duplicates for alternate key?
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Fri Sep 09, 2005 6:40 pm
Reply with quote

Hi,


Quote:
1) Can we display the condition variables using DISPLAY statement. I mean the variables declared with 88 Level?


No we can not display 88 level verb

Quote:
2) Which represents the end of the SECTION in COBOL program. Like EXIT represents the end of the paragraph


SECTION is group of paragraph. In a section there may more than one Paragraph. and EXIT statement is mention at last Paragraph which represent end of SECTION. the other paragraphs do not have any EXIT statement.


Quote:
3) is it mandatory to code EXIT at the end of the paragraph?


Yes, It is mandatory to code EXIT at the end of paragraph if it is not in any SECTION. Means it is only Paragraph.


Quote:
4) what is the difference between Array and the Table in COBOL. I assume both are same, is this correct?


I guess, there is no ARRAY concept in COBOL. We can say that Table is similar to Array concept.



Regards
Rupesh
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Sep 12, 2005 1:47 am
Reply with quote

Neither SECTIONS or Pgraphs require an EXIT stmt. The next SECTION will end a SECTION. The next SECTION or Pgraph will end a Pgraph.
Back to top
View user's profile Send private message
sgk_81

New User


Joined: 12 Sep 2005
Posts: 2

PostPosted: Mon Sep 12, 2005 3:18 pm
Reply with quote

All paragraphs need scope terminator(a full stop) to signal an end of paragraph, else you get a compile time error with the message "A period was required before procedure-name 'paragraph name(next para name)' "
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Sep 15, 2005 7:13 am
Reply with quote

Quote:
All paragraphs need scope terminator(a full stop) to signal an end of paragraph


As the Godfather once said "Dat goes widout sayin". icon_wink.gif
Back to top
View user's profile Send private message
ikumar

New User


Joined: 02 Aug 2005
Posts: 81

PostPosted: Fri Sep 16, 2005 2:05 am
Reply with quote

Hi All,

Thanks for the answers.

Can you please answer my 5th Question...

Kumar
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Sep 16, 2005 5:45 am
Reply with quote

Kumar,

You have to define the alt key via IDCAMS and you have to define it in a DD stmt in JCL when you reference the file in a pgm.

I think the dupes is an option of the DEFINE IDCAMS stmt.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top