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

IF there 5 to 6 files in a JCL and there is some space abends, how can we identify which file has space abend and what can be done to get off that abend or rectify that abend.

2 Answers   ADNA, CSC,


. How do we cast a variable in COBOL

1 Answers   HSBC,


I want to remove a duplicates form a given input field using cobol program. please Any one help me out to solve this ... Thanks in Advance.

3 Answers   IBM,


i want to learn mainframes. i completed MCA ,whats the future of mainframes

5 Answers  


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

0 Answers   HeadStrong,






consider the following piece of code 01 GROSS-PAY 05 BASIC-PAY PIC 9(5) 05 ALLOWENCES PIC 9(3) if BASIC-PAY has a value 1000 and ALLOWENCES has a value of 250,what will be displayed by the statement DISPLAY GROSS-PAY a.1250 b.01000250 c.01250 d.1.250

3 Answers   TCS,


what is scope terminator

2 Answers   IBM,


How to increase the logical record length of existing PS file?

7 Answers  


88 class is used for

5 Answers   CTS, EDS,


What is the significance of the PROGRAM-ID paragraph? If this name doesnt match with the name of the COBOL program, does it make a difference? Is the name specified in the PROGRAM-ID paragraph used as a name for the load module or any such thing?

4 Answers   IBM,


How do we get current date from system with century in COBOL?

0 Answers   Winsol Solutions,


What is the size of s9(19)comp3? explain

8 Answers  


Categories