GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 119 of 162    Print  
How do you use REDEFINE for a group variable which is having arrays in it?

01 VAR-A PIC X(100)
01 VAR-B REDEFINES VAR-A.
05 TEMP-1 OCCURS 0 TO 10 TIMES DEPENDING ON VAR-X.
05 TEMP-2 OCCURS 1 TO 100 TIMES DEPENDING ON VAR-Y.
How do you use it in file section?

  
Total Answers and Comments: 1 Last Update: November 22, 2007     Asked by: sagar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 22, 2007 03:26:20   #1  
sai mainframes Member Since: November 2007   Contribution: 13    

RE: How do you use REDEFINE for a group variable which...
hi sagar

you are going to redefine var-a with var-b right?

so you can use directly var-b group name in your code.

 
Is this answer useful? Yes | No

 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 : This section allows a COBOL program to receive values from JCL. Also, if you are calling a sub-program and you require some values to be passed between them, then this is the section that should be used.Thus in a short, this section allows a value to ...

Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc?
An external sort is not COBOL; it is performed through JCL and PGM=SORT. It is understandable without any code reference. An internal sort can use two different syntaxes: 1.) USING, GIVING sorts are 

LENGTH acts like a special register to tell the length of a group or elementary item.  
Latest Answer : Length is an Intrinsic function in Cobol which returns number of characters in any variable. ...

Latest Answer : It is 32767, irrespective of VSAM or non VSAM. In case of VSAM you will have to give no SPANNED while DELETE-Defining the cluster. IF any doubts you can verify creating in mainframes. ...

Latest Answer : Yes, it can be used at 01 level but cannot be used at 77 level. ...

Latest Answer : An explicit redefines can be used at any level number except 01. An implicit redefines can occur if multiple 01s are coded for the same file. ...

In the example below 05 WS-VAR1 PIC X(5),05 WS-VAR2 REDEFINES WA-VAR1 PIC 9(5),PROCEDURE DIVISION MOVE 'ABCDE' TO WS-VAR1.Now what is the value of WS-VAR1 and WS-VAR2 ?

I have a variable x(20), but i need the out as in two ways One is 1.12300000000000000000, other one is 2.123-----------------?
Read Answers (5) | Asked by : samayamsas

In file section of a COBOL program, I have the following line.Record varying from 122 to 160 depending on WS00_RECORD_LENGTH. How would the value of WS00_RECORD_LENGTH found out? Where will it be?

Latest Answer : What would you say about this piece of code?01  WS-VARIABLE PIC X(5).                              01  ...
Read Answers (24) | Asked by : vinayk


 Sponsored Links

 
Related Articles

Microsoft AJAX Library - Associative Arrays

Thinking of Objects as Associative Arrays A key element in understanding JavaScript objects is understanding the notion of associative arrays which are nothing more than collections of key value pairs As a NET developer you have worked with associative arrays represented by classes such as NameValue
 

C++ Multidimensional Arrays

C Multidimensional Arrays In this C tutorial you will learn about Multidimensional arrays what is Multidimensional array how is Multidimensional arrays represented in C how to access the elements in the Multidimensional array mosgoogle center What is a Multidimensional Array A Multidimensional arra
 

What is Data File

In a logical data model, the conceptual data model which is based on the business semantic is being defined. Thus, entities and relationships and corresponding table and column design, object oriented classes, and XML tags, among other things are being laid regardless of the database will be physica
 

What is Data Attribute Group

In data modeling, a logical data model is the representation of business data into a data model that can be the basis for the physical database implementation. It identifies a data "periodic table" which will be the basis for the business functions, processes and task to be perfor
 

What happens when a variable is not initialized in main function?

When a variable is not initialized in main function it contains garbage value. This can be well seen from the example below main() { int x; printf(“%d”,x); z= sample() } sample() { printf(“Testing program”); } Output is   &n
 

What happens when a variable is not declared in function definition?

Generally in C program the function definition and calling takes the form as given below: main() { int x,y,z; z=sample(x,y); printf(“%d”,z); } sample(x1,y1) int x1,y1; { int z1; z1= x1 - y1; return(z1); } Here what happens is the values x, y gets passed to x1,y1
 

Advertising Copy Group Head Career

Every department in any profession needs a supervisor who overlooks the work of everyone else. This person obviously needs to be well experienced in the respective field, and should also be good with people management. He or she should be able to identify mistakes and correct them. Overall, the job
 

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
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape