What will happen if a variable is declared as below..
Explain with an example? Working storage section:-

01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'.
01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'.

What will happen I am going to Display the WS-VARX and WS-
VARN?

Answer Posted / neela

Hi KHB Naidhu,
pic x means it should be alphanumeric
pic 9 means it should be Numeric

so we have to move numeric values also to the pic x

for this qtion is correct what was explained my
mallikarjuna.

regards
Neela

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

670


Explain how you can characterize tables in cobol?

636


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2728


What are the pertinent COBOL

2041


) how do u code after getting data?

1578






how do you reference the printer file formats from cobol programs

653


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1927


how do you reference the fixed unblock file formats from cobol programs

703


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

670


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

695


How to remove 2 duplicate records and copy only one using job control language?

737


i want a program using by if, evaluate , string, unstring, perform, occurs?

4045


Explain about different table spaces.

643


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5051


What is the difference between a binary search and a sequential search what are the pertinent cobol?

727