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 / anna
WORKING-STORAGE SECTION.
01 WS-VARX PIC X(9) VALUE SPACE.
01 WS-VARN REDEFINES WS-VARX PIC 9(9) value zeros.
in this case you can used any data, by using right
field for numeric data ws-varN, for alphabetic /alphanumeric
ws--varX.
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is the usage of comp fields in cobol?
What are the pertinent COBOL commands?
When is inspect verb is used in cobol?
What is comp-1 and comp-2?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
What is the difference between structured cobol programming and object alternativelyiented cobol?
how do you reference the ksds vsam file formats from cobol programs
IF I mention stop run in CICS what happens?
how to access the file from prodution from changeman tool and to submit a file to production
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
What are the pertinent COBOL
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 ......
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
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.
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?