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  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 147 of 158    Print  
Working Storage Definition
Consider the follwing snippet:

01 WS-VAR USAGE IS INDEX

Is this a valid working storage definition?
Justify your answer



  
Total Answers and Comments: 1 Last Update: May 21, 2008     Asked by: sprabodhini 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: guraddiv
 
Hi,

   This is not a Valid definition bcz the USAGE IS INDEX clause is used to provide an optimized table subscript. When a table is the target of a SEARCH statement it must have an associated index item.
     Any item declared with USAGE IS INDEX can only appear in:
        - A SEARCH or SET statement
        - A relation condition
        - The USING phrase of the PROCEDURE DIVISION
        - The USING phrase of the CALL statement

Above answer was rated as good by the following members:
sprabodhini, vukoti1229
May 21, 2008 05:28:41   #1  
guraddiv Member Since: April 2008   Contribution: 18    

RE: Working Storage Definition
Hi,

   This is not a Valid definition bcz the USAGE IS INDEX clause is used to provide an optimized table subscript. When a table is the target of a SEARCH statement it must have an associated index item.
     Any item declared with USAGE IS INDEX can only appear in:
        - A SEARCH or SET statement
        - A relation condition
        - The USING phrase of the PROCEDURE DIVISION
        - The USING phrase of the CALL statement

 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    

 Related Questions

The linkage section is part of a called program that 'links' or maps to data items in the calling program's working storage. It is the part of the called program where these share items 
Latest Answer : Each parameter to be accepted or passed by a procedure must be declared in the LINKAGE SECTION.This section lists buffers for data are common to calling and called programs. Calling parameters are set in the Linkage Section of the called programs and ...

A subscript is a working storage data definition item, typically a PIC (999) where a value must be moved to the subscript and then incremented or decremented by ADD TO and SUBTRACT FROM statements. An 
Latest Answer : subscript tells the occurance of a table.where as index tells the displacement of the table. subscript is a working storage variale where as index is not a working storage variable. never use both index and subscript combinely ...

Wake up - you haven't been paying attention! It's not possible to pass an index via linkage. The index is not part of the calling programs working storage. Those of us who've made this 
Latest Answer : We can pass subscript by linkage section. index cant. ...

Latest Answer : (1) WORKING STORAGE SECTION is used to declare internal data items that is used in the same program.(2) LINKAGE SECTION is used to declare data items that we want to share with other program. ...

Can we fetch select in working storage section variables directly without using the host variables?
Read Answers (5) | Asked by : Abhishek mangal

A place to reserve storage for data that is not part of the program's input or output. This area contains fields that are used as temporary storage while the program is executing. Some temporary storage 
Latest Answer : you need the section to define all your variables.But you don´t have to hardcode. You can copy a copybook, where you´re variables are inside. let me know, if you need more details. ...
Read Answers (1) | Asked by : irinak

Latest Answer : Yes, by using INSPECT eg., INSPECT variable REPLACING LEADING ZEROS BY SPACES. ...
Read Answers (1) | Asked by : v.Bharathi dasan

Consider the follwing snippet:01 WS-VAR USAGE IS INDEXIs this a valid working storage definition?Justify your answer 
Latest Answer : Hi,   This is not a Valid definition bcz the USAGE IS INDEX clause is used to provide an optimized table subscript. When a table is the target of a SEARCH statement it must have an associated index item.     Any item declared ...


 Sponsored Links

 
Related Articles

ODP.NET - Working with OracleDataAdapter with OracleCommand

ODP NET Working with OracleDataAdapter together with OracleCommand In the previous examples we worked with OracleDataAdapter by directly specifying SQL statements You can also pass OracleCommand to OracleDataAdapter This is very useful if you deal with stored procedures covered in Chapter 5 or bind
 

ODP.NET - Working with Bind Variables together with OracleParameter

ODP NET Working with Bind Variables together with OracleParameter With the help of OracleParameter you can include bind variables within any SQL statement These bind variables are nothing but run time query parameters The values in the SQL statement are bound at run time when we use bind variables m
 

ODP.NET - Handling Nulls when Working with OracleDataReader

ODP NET Handling Nulls when Working with OracleDataReader When we work with OracleDataReader or for that matter even with data rows in a data table we may come across nulls The following is the efficient way to deal in with such scenarios mosgoogle geshibot language VB NET" create connect
 

ODP.NET - Working with DataTableReader

ODP NET Working with DataTableReader DataTableReader is complementary to a DataTable object and is mainly used as a type of Data Reader in the disconnected mode The following is the modified code mosgoogle geshibot language VB NET" create connection to db Dim cn As New OracleConnection D
 

C++ Storage Classes

C Storage Classes In this C tutorial you will learn about storage classes types of storage class variables Automatic External and Static explained with examples mosgoogle center Storage classes In the context of scope of variables in functions exists the important concept of storage class What is St
 

Working with XML in C

Working with XML in C The Role of XML with C The Extensive Markup Language has changed the way in which information is being viewed and exchanged Users can share their sensitive documents on the World Wide Web by declaring what is theirs for EDI or Electronic Data Interchange data publishing a data
 

Working with XML in Perl

Working with XML in Perl Extensive Markup language or the XML is a sort of data storage; it is very structured and mapped out There are two most important aspects of XML that has to be covered one is writing in XML and reading it out in XML Parsers have already been created in XML and knowing how t
 

Working with XML in Python

Working with XML in Python The Extensive Markup Language and Python are two very different platforms Python is a programming language and XML is a standards oriented language document Python is a full fledged programming language which has its roots deep in scripts and also has matured over a period
 

Working with XML in Flash

Working with XML in Flash To integrate an XML document with Flash we need an XML document that works with Flash one that can set up the visual movements of the action movie and define the script that will be used for the code of the action movie mosgoogle center How do We Integrate XML and Macromed
 

Working with XML in Oracle

Working with XML in Oracle Introduction to XML Extensive markup language is the language which presents data in a human readable form of text The data can be anything from a purchase order or a stock quote or weather radar or a flight schedule it can be represented using XML XML is very similar to H
 





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