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

COBOL Interview questions


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

New User


Joined: 18 Apr 2005
Posts: 67

PostPosted: Mon May 30, 2005 6:19 pm
Reply with quote

pls give me the answers of the following questons asap?

1)To use search all,the table should be in sorted order .iam loading the table from one of the pds members.the pds members data is not sorted order .How will i load the table in sorted order?(u should not use in jcl)?

2) how to get the actual length of alpha numeric item?

3)what is ut-s means with respect to select statment?

4)is dynamic allocation is posible in cobol?if yes how?

5)what is the difference between on siize error and on overflow?

6) what is limit of linkage section?
Back to top
View user's profile Send private message
kanak

Moderator


Joined: 12 Mar 2005
Posts: 252
Location: India

PostPosted: Mon May 30, 2005 6:31 pm
Reply with quote

1.To perform search all table should be in sorted order.For Detail explanation plz check this link.

www.ibmmainframes.com/viewtopic.php?t=1895&highlight=

to sort ur table try with either bubble sort(if the number of element is less) or try with insertion sort...just see whatever logic is most suitable in ur case.
6. Normaly at max you can pass 32k of data through linkage section. but in some case you can pass 64k provided if allowed.
correct me if i m wrong.
Back to top
View user's profile Send private message
sree_2503

New User


Joined: 22 May 2005
Posts: 12
Location: Chennai,India

PostPosted: Tue May 31, 2005 6:40 pm
Reply with quote

Hi Rambabu,

2) Dint get what u r trying to say? PIC X is alphanumeric, place a display before it and u get to see the length of the var...

3) UT-S implies Utility-Sequential(Utility is the Device Class and Sequential is the Method/Organization)

5) When the receiving field is lesser than the Passing field u get the Overflow error and the values passed will be truncated. So, u define the Var with the cond ON SIZE ERROR -> Do this.

Hope this helps....
Back to top
View user's profile Send private message
shailendra

New User


Joined: 08 Jun 2005
Posts: 10
Location: Pune

PostPosted: Fri Jun 10, 2005 4:09 pm
Reply with quote

1) Use the SORT in your COBOL program for sorting data in your PDS and then move it to your table.

2) Use INSPECT working-storage variable TALLYING counter FOR CHARACTERS. The lentgh will be stored in the counter variable.

3) Sree's answer is right.

4) Dynamic allocation of what? You can dynamically call any subroutine, for that you need to give DYNAM in ur compiler option. Or call subroutine with identifier and not with literal.

5) In my view both are almost same. You can handle ON SIZE error but don't know whether we can handle overflow condition.

6) I don't know the limit of linkage section but the limit of PARM is 100. i.e you can values from JCL using PARM upto 100.
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 2
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 Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top