HOW TO MOVE REDEFINES CLAUSE FROM INPUT TO OUTPUT ?



HOW TO MOVE REDEFINES CLAUSE FROM INPUT TO OUTPUT ?..

Answer / adarsha

01 ws-misc-vars.
05 system-date pic x(06) value spaces.
05 system-date-rede redefines system-date
10 system-dt-yy pic x(02) value spaces.
10 system-dt-mm pic x(02) value spaces.
10 system-dt-dd pic x(02) value spaces.

01 ws-rep-dt-frmt pic x(06) value space.
.
.
.

procedure division.

move system-date to ws-rep-dt-frmt.

*** when you want any particular variable to be recevied or
stored in a particular format you can redefine them in the
way you want.. here system-date-rede has the same value as
system-date !

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More COBOL Interview Questions

Whats the use of Examine command? can someone help me?

1 Answers   IBM,


How do u find the programs calling the given module, without having doing 3.13 on loadlib/source library?

2 Answers  


Define in-line perform?

1 Answers  


What is a SSRANGE and NOSSRANGE?

0 Answers  


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).

8 Answers  


What are different file OPEN modes available in COBOL?

4 Answers   Sun Life,


Which is not true about evaluate statement

0 Answers  


If we put three reads in COBOL in the same para one after the other, to read a PS file,will it read the same record thrice or it will read three records sequentially? For example : Input File 01 02 03 Para 900 Read infile Display Infile rec Read infile Display infile rec Read infile Display infile rec. What will be the output?

2 Answers  


We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)

1 Answers   Cap Gemini,


What is the mode in which you will OPEN a file for writing?

4 Answers  


Explain about different table spaces.

0 Answers  


wht is the difference between goto and perform stmts

7 Answers   DELL,


Categories