OCCURS AND REDEFINES



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

OCCURS AND REDEFINES

Postby breentha_d » Sun Apr 12, 2009 6:14 pm

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
breentha_d
 
Posts: 28
Joined: Mon Dec 10, 2007 2:26 am
Has thanked: 0 time
Been thanked: 0 time

Re: OCCURS AND REDEFINES

Postby dick scherrer » Mon Apr 13, 2009 9:15 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: OCCURS AND REDEFINES

Postby dick scherrer » Tue Apr 14, 2009 6:49 am

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).                               
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post