GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Mainframe
Go To First  |  Previous Question  |  Next Question 
 Mainframe  |  Question 49 of 51    Print  
When can the USING phrase be included in the call statement ?

  
Total Answers and Comments: 1 Last Update: July 07, 2008     Asked by: sprabodhini 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 07, 2008 04:45:04   #1  
shrutimehendiratta Member Since: July 2008   Contribution: 1    

RE: When can the USING phrase be included in the call statement ?
  • The USING phrase makes data items defined in a calling program available to a called subprogram. The USING phrase is required only if the object program is to be invoked by a CALL statement and that statement includes a USING phrase.
  • Each USING identifier in a calling program names data items that are defined in any Data Division section.
  • An identifier may appear more than once in a Procedure Division USING phrase. The last value passed to it by a CALL USING statement is used.
  • Data items defined in the Linkage Section of the called program may be referenced within the Procedure Division of that program if, and only if, they satisfy one of the following conditions:
    • They are operands of the USING phrase of the Procedure Division header.
    • They are defined with a REDEFINES or RENAMES clause, the object of which satisfies the above conditions.
    • They are items subordinate to any item that satisfies the condition in the rules above.
    • They are condition-names or index-names associated with data items that satisfy any of the above conditions.

The USING phrase is valid with the following:

    • The Procedure Division header of a called subprogram:

      The USING phrase is valid in the Procedure Division header of a called subprogram entered at the beginning of the nondeclaratives portion; each USING identifier must be defined as a level-01 or level-77 item in the Linkage Section of the called subprogram; it must not contain a REDEFINES clause.

    • The CALL statement of a called subprogram:

      In a calling program, the USING phrase is valid for the CALL statement; each USING identifier must be defined as a level-01, level-77, or an elementary item in the Data Division. The maximum number of data-names that can be specified is 30.

      The USING phrase is specified in the Procedure Division header if, and only if, this program is a subprogram invoked by a CALL statement that itself contains a USING phrase. That is, for each CALL USING statement in a calling program, a corresponding USING phrase must be specified in a called subprogram.

      The identifiers specified in a CALL USING statement name data items available to the calling program that may be referred to in the called program; a given identifier may appear more than once. These items are defined in any Data Division section.


 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : In a static call, the call is done using a literal. Compiler option is NODYNAMIn a dynamic call, the call is done using variable. Compiler option is DYNAM ...
Read Answers (3) | Asked by : balu

Can i call 5 pgms using static call n 3 pgms using dynamic call in a single pgm, if then how many load modules will be there? What about the compiler option(parm)to use?
Read Answers (6) | Asked by : upendar

Latest Answer : While you want execute a program inside a procedure we can use           Exec Pgm=N1233am i right    ...
Read Answers (4) | Asked by : Ruchir

Latest Answer : The USING phrase makes data items defined in a calling program available to a called subprogram. The USING phrase is required only if the object program is to be invoked by a CALL statement and that statement includes a USING phrase. Each USING identifier ...


 Sponsored Links

 
Related Articles

How does the function call within function get evaluated?

Whenever we have more than one function which is called for a finite number of times then such a function gets evaluated from inside out. Let us understand this concept with an example. For instance consider a function sample called within it 4 times as given in program below: main() { int a=50;
 

How to call C header that is not provided generally by system in C++?

Headers can be called by using extern C Syntax of extern C is: extern "C" <function declaration> for example to call C functions from C++ we can write extern "C" { <function declaration> <function declaration> ...
 

What is difference between call by value and call by reference in function?

The arguments passed to function can be of two types 1. Values passed 2. Address passed The first type refers to call by value and the second type refers to call by reference. For instance consider program1 main() { int x=50, y=70; interchange(x,y); printf(“x=%d y=%d”,x,
 

What are the limitations with switch statement?

Switch statement is a powerful statement used to handle many alternatives and provides good presentation for C program. But there are some limitations with switch statement which are given below: Logical operators cannot be used with switch statement. For instance case k>=20: is not allowe
 

goto Statement

Why to avoid goto in C C has goto statement but one must ensure not to use too much of goto statement in their program because its functionality is limited and it is only recommended as a last resort if structured solutions are much more complicated. First let us understand the goto statement, its
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Mainframe Features

Mainframe Features In this Mainframe tutorial you will learn about features of Mainframe Processing power memory capacity performance computing multiple operating system time sharing reliability serviceability availability clustering technology and other features available in Mainframe mosgoogle cen
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape