Page 1 of 1

OCCURS AND REDEFINES

PostPosted: Sun Apr 12, 2009 6:14 pm
by breentha_d
hI,

i WOULD LIKE TO KNOW HOW TO USE THE OCCURS CLAUSE CORRECT . CAN IT BE USED WITH PICTURE DEFINITION. I DONT UNDERSTAND HOW THE REDEFINES WORK. COULD SOMEONE PLEASE EPLAIN TO ME?


THANK YOU
BREENTHA

Re: OCCURS AND REDEFINES

PostPosted: Mon Apr 13, 2009 9:15 am
by dick scherrer
Hello,

All of the info is here:
http://publibz.boulder.ibm.com/cgi-bin/ ... 0/CONTENTS?

If you find somethng that is not clear, post what you found and what is not clear. Someone will be able to clarify.

Re: OCCURS AND REDEFINES

PostPosted: Tue Apr 14, 2009 6:49 am
by dick scherrer
Hello,

Have you been able to find what you need in the cobol manual?

Had nothing but a very slow dial-up and no mainframe connectoin for the last few days (road hazard<g>).

Here are a couple of small examples of redefines:
           03  CURR-YMD                PIC 9(08).                               
           03  FILLER                  REDEFINES   CURR-YMD.                   
               05  CURR-YMD-CCYY       PIC 9(04).                               
               05  CURR-YMD-MM         PIC 9(02).                               
               05  CURR-YMD-DD         PIC 9(02).   
   
           03  WS-TIME                 PIC 9(06).                               
           03  FILLER                  REDEFINES   WS-TIME.                     
               05  WS-TIME-HH          PIC 9(02).                               
               05  WS-TIME-MM          PIC 9(02).                               
               05  WS-TIME-SS          PIC 9(02).