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
shiva_suresh
Warnings : 2

New User


Joined: 05 May 2005
Posts: 11
Location: Bangalore

PostPosted: Thu Jul 21, 2005 5:56 pm
Reply with quote

1)How to extract 41 to 45 portion from a variable which is declared as
X(80)?
2) How static call and dynamic call works when changes are made both
in main pgm and sub pgm?
3) sHOW YOU can arrange the following in sorted order using search(2,5,1,3...)?
4) If 100 pds members are there how can you locate nameof particular pds?
5) how we can convert 9(10)v9(2) to 9(12)v9(2)?

Thanks in advance
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Thu Jul 21, 2005 6:39 pm
Reply with quote

Hi Suresh,

Quote:
1)How to extract 41 to 45 portion from a variable which is declared as
X(80)?

By which means you are trying to extract is the question here....If using in a COBOL prog refer by WS-VARIABLE[41:5]....
Quote:
3) sHOW YOU can arrange the following in sorted order using search(2,5,1,3...)?

I didnt get this one......
Quote:
4) If 100 pds members are there how can you locate nameof particular pds?

I understand ..you are trying to locate one PDS member among the list of 100 members....If Ues...Use L at Command Line with Member Name....
If you meant that you have 100 members & want to know about the PDS name for them randomly....so open the member & you will get name of the PDS too...

Quote:
5) how we can convert 9(10)v9(2) to 9(12)v9(2)?

Cant you move first var to other.....I think it should work fine....

Comments welcome.....

Regards,

Priyesh.
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Tue Jun 06, 2006 12:53 pm
Reply with quote

1)How to extract 41 to 45 portion from a variable which is declared as
X(80)?
Hey U can use the refrence modification or the Unstring command to extract the 41 to 45 portion of a variable ie,
Move x(41:5) to new-varaibale-name;

2) How static call and dynamic call works when changes are made both
in main pgm and sub pgm?

Check the link www.screenio.com/tips/calls.htm

3) sHOW YOU can arrange the following in sorted order using search(2,5,1,3...)?
U mean to arrange the following numbers in the sorted order or u mean to search a particular Number.
If u use binary search the Numbers shuld be sorted b4 the search can be performed

4) If 100 pds members are there how can you locate nameof particular pds?
Use the locate comand it should work fine
5) how we can convert 9(10)v9(2) to 9(12)v9(2)?

Change the Picture clause
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Tue Jun 06, 2006 1:41 pm
Reply with quote

Q : If 100 pds members are there how can you locate nameof particular pds?

ANS :You can also use Search in dataset utilities. 3.14 or 3.15 option by which you can search for a particular string or strings in a PDS. The string can be anything Member name, Program name inside a member.

Q : how we can convert 9(10)v9(2) to 9(12)v9(2)?
ANS : You can redefine it with 9(12)v9(2).


Correct me if I am wrong.

Thanks & Regards,
Ranjit...
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 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