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

Consider the following code: 77 A PIC 99V99 VALUE 55.35 77 B PIC 99V999 VALUE 32.754 ADD B TO A ON SIZE ERROR DISPLAY "ERROR!!!" What will be the result ? (a) A=88.10, B=32.754 (b) A=87.00 B=32.754 (c) A=87.10 B=32.754 (d) ERROR!!! will be DISPLAYed on the screen.

3 Answers   TCS,


1.Can we define condition-name conditions in FD entry.

11 Answers  


can we write paragraph in area B .....

4 Answers   L&T,


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length

3 Answers   TCS,


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

0 Answers  


how to create temporary data set in jcl? what is the use?

3 Answers   Cap Gemini, Temenos,


Have you used comp and comp-3 in your project? And how?

0 Answers   IBM,


what is amode(24), amode(31), rmode(24) and rmode(any)?

0 Answers  


What is perform what is varying?

0 Answers  


how can u pass the values into db2 values from cobol ?

3 Answers   CTS,


How is sign stored in Packed Decimal fields and Zoned Decimal fields?

6 Answers   ABC, HCL, TCS,


What is the LINKAGE SECTION used in COBOL?

0 Answers   UGC Corporation,


Categories