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 / lalit

I am agreed with Rookie. It will abend if any mathematical
operation like add, subtract will be performed with
variable WS-VARX, but if any mathematical operation is
performed using WS-VARN then it will not abend because it
is numeric in nature.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between PIC 9.99 and 9v99 in COBOL?

737


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2100


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

1657


What is a report item?

741


what is the difference between COBOL2 AND COBOL390?

2455






I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1119


explain sorting techniques in cobol program?

692


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

5379


Which Search verb is equivalent to PERFORM…VARYING?

689


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

1703


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

661


how to move the records from file to array table. give with code example

2223


how to access the file from prodution from changeman tool and to submit a file to production

6687


What is the Purpose of Pointer in the string?

643


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

669