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 |
What guidelines should be followed to write a structured cobol prgm?
In a program, there are 2 sections defined say SECTION-A and SECTION-B. There is a paragraph say CALC-INT in both the sections. If this para has to be called directly for SECTION-A, then PERFORM CALC-INT will not work as it is present in both sections. How the PERFORM statement has to be coded here?
01 ws-p pic 9(2). 01 ws-q pic 9(2) value 01. 01 ws-r pic 9(2) value 99. p.d. compute p = q + r what will be result of p ans(00) but my question is that how i got 10 on the place of 00. (truncation will ocuure on right side not left). please tell me ?
is it possible to pass an SQL query inside a jcl which is inside a cobol program?
Suppose a program has the following code. What will be the output? MAIN-PARA. DISPLAY 'MAIN-PARA' PERFORM SECTION-A. STOP RUN. SECTION-A. PARA-A1. DISPLAY 'SECTION A PARA A1'. PARA-A2. DISPLAY 'SECTION A PARA A2'.
What is JOBLIB and STEPLIB in JCL? what is the purpose of using it?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
WHAT IS SOC3?HOW IT CAN BE RESOLVED?
What is the difference between binary search and sequential search?
What is the maximum data length for Numeric DataType ?
What are the rules of the move verb?
diffrence between renames and redifnes with examples