Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
shiva_suresh
Warnings : 2

New User

Joined: 05 May 2005
Posts: 11
Location: Bangalore

 Posted: Thu Jul 21, 2005 5:56 pm    Post subject: COBOL Interview Questions 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

priyesh.agrawal

Senior Member

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

Posted: Thu Jul 21, 2005 6:39 pm    Post subject: Re: plz answer the following questions

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....

Regards,

Priyesh.
Prasanthhere

Active User

Joined: 03 Aug 2005
Posts: 306

 Posted: Tue Jun 06, 2006 12:53 pm    Post subject: Re: COBOL Interview Questions 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 http://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
ranjitbhingare

New User

Joined: 30 Nov 2005
Posts: 94
Location: PUNE

 Posted: Tue Jun 06, 2006 1:41 pm    Post subject: 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...
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us