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 want Display WS-VARX and WS-VARN?

Answer Posted / reena

The Redefined clause cannot contain a Value Clause.
i.e. it should only be WS-VARN REDEFINES WS-VARX PIC 9(5).

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a cobol program making use of the redefine clause.

827


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.

1220


Give some examples of command terminators?

849


Why would you use find and get rather than to obtain?

777


How you can read the file from bottom?

749






Are you comfortable in cobol or jcl?

719


What is rmode(any) ?

777


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

804


When is inspect verb is used in cobol?

791


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

805


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

2448


How do we get current date from system with century in COBOL?

928


What are different data types in cobol?

790


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?

1892


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

851