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 |
I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?
What are all the divisions of a COBOL program?
Define cobol?
how can count the number of character in feild ?? suppose for instance i have a feild with value ' rajesh sarkar' then how can v count the number of characters whitout spaces...........
what is the purpose of linkage section?
What is the difference between working storage copybook and linkage section copybook?
How do we get current date from system with century in COBOL?
How can you submit a job from COBOL programs?
What is binary search?
What is the difference between COMP & COMP-3 ?
how can we find total no of records in a file ....is there any utility......?
what happens when a copybook variables are declared using include statement ?