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

if you use redefines in your statement the numeric
declaration will be over rided and stored as charechter, i
have testing this practically

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many sections are there in data division in COBOL?

678


What is a SSRANGE and NOSSRANGE?

820


Mention the guidelines to write a structured cobol program?

618


What is redefines clause in COBOL?

847


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2333






what happens if parmparameter passes zero bytes to the program

1664


What is the local-storage section?

681


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

417


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

996


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

2730


Can you please let me know the centre name of INS certification in Kolkata.

1715


Explain how you can characterize tables in cobol?

636


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2103


I have a File that has duplicate records. I need only those records that occur more than thrice.?

8650


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

10599