Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What will happen if a variable is declared as below..
Explain with an example?

Working storage section:-
01 WS-VARX PIC X(9) VALUE SPACES.
01 WS-VARN REDEFINES WS-VARX PIC 9(9).

Answer Posted / lalith

Working storage section:-
01 WS-VARX PIC X(9) VALUE SPACES.
01 WS-VARN REDEFINES WS-VARX PIC 9(9).

REDEFINES: It is used to save the memory space....

ur declearing like that ws-varn will take the same memory
of ws-varx...

when u used display statement
DISPLAY WS-VARN
it shows the spaces... WS-VARN will take same memory of WS-
VARX irrespective of data type....

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

1142


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

1199


what is difference between cobol and cobol/400

22731


In COBOL, what is the different between index and subscript?

1184


Differentiate between structured cobol programming and object-oriented cobol programming.

1074


What is the compute verb? How is it used?

1074


What is the default value(s) for an initialize and what keyword allows for an override of the default?

1154


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

2221


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

1286


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

2076


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

1032


what is search and searchall?what is the diffrence between them?give an best example?

6664


When is inspect verb is used in cobol?

1179


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

1107


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2543