Can we move X(9) to 9(9). If yes what are the ways for
doing this?

Answers were Sorted based on User's Feedback



Can we move X(9) to 9(9). If yes what are the ways for doing this?..

Answer / varun v

yes you can..use REDEFINES for the same purpose.

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

Now you can move X(9) variable to WS-VARX.Eventually it is
moved to the 9(9) variable WS-VARN.

Is This Answer Correct ?    12 Yes 5 No

Can we move X(9) to 9(9). If yes what are the ways for doing this?..

Answer / ashish

Alphanumeric to numeric movement is possible but not always,
say if it has numeric value then only it is possible o/w if
it contains alphabetic value then it wont b possible

Is This Answer Correct ?    10 Yes 4 No

Can we move X(9) to 9(9). If yes what are the ways for doing this?..

Answer / nidhi

The NUMVAL function returns the numeric value represented by the
alphanumeric character string specified in an argument. The function
strips away any leading or trailing blanks in the string, producing a
numeric value that can be used in an arithmetic expression.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More COBOL Interview Questions

What is LENGTH in COBOL II?

2 Answers   CSC,


We have 3 programms A,B,C.In the middle of the program A the controls goes to program B and in the middle of the program B control wants to go program C,after completion of program C again control comes to program B and again after completion of program B control comes to program A.How the process will takes and what are the controls we use for that process.If it is possible anybody of you explain with example?

5 Answers   IBM,


how would find total records in files using seqientional

1 Answers   HSBC,


what is the difference between start and startbr?

2 Answers  


How to resolve the soc4 and soc7 errors?

5 Answers   IBM, RBS,






What type of Call you would use if you don;t want the control back to the calling program?

8 Answers   TCS,


If by mistake we MOVE a working storage variable into LINKAGE area. What will happen??

4 Answers   Accenture,


HI THIS IS ANIL. HOW TO PASS A RECORDS OF A FILE(PS OR PDS) TO AN ARRAY?

2 Answers  


How is sign stored in a comp-3 field?

7 Answers  


TYPES OF SORTINGS. which is more prefarable.

2 Answers   Syntel, TCS,


Can you REWRITE a record in an ESDS file? Can you DELETE a record from it?

6 Answers   ABC, IBM, Mphasis, Wipro,


i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,copy,write operations).plz give me details of all posible JCL utilities?

7 Answers   CTS,


Categories