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?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / jitinder
The Syntax of Redefine Clause is
Label number data-name-1 REDFINES data-name-2
Here data-name-1 should not contain VALUE clause, but data-
name-2 can contain VALUE clause.
Plz correct me if i m wrong.
Is This Answer Correct ? | 1 Yes | 3 No |
Answer / saveen
ws-varx will have 12345fghij
ws-varn will have 12345.
pls kindly post ur views. am a beginner.
Is This Answer Correct ? | 4 Yes | 11 No |
how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?
If i got a job on mainframe technology, will i have a bright future?. Some people are discouraging me. Let me know, is it true? Please bring back me from the confusion.
can internal sort be applied to sort ksds files?
in the TIME parameter we r giving hours r minutes
Can you call an OS VS COBOL pgm from a VS COBOL II pgm ?
What is difference between com and com3? Eg. s9(4) so what is the memory it will occupy com and com3.
01 a pic 9(9v99) 01 b pic 9(9.99) wht will be the stored vales in both cases
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
How do pass the values to the parameters in cobol
Can we move X(9) to 9(9). If yes what are the ways for doing this?
what is label record is standard or omitted in file description of data division?
Can we change the password using ALTER? anyone tried and changed?