View previous topic :: View next topic
|
Author |
Message |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi
Could anyone please tell me if it is possible to REDEFINE a FILLER .
Thanks
Arun |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Arun,
We cant redefine a filler . |
|
Back to top |
|
|
vijay_bn79
New User
Joined: 20 Nov 2006 Posts: 48 Location: Hyderabad
|
|
|
|
If you try to redefine FILLER
you will get compilation error
Thanks |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Thanks to all
Arun |
|
Back to top |
|
|
cobolunni
Active User
Joined: 07 Aug 2006 Posts: 127 Location: kerala,india
|
|
|
|
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. SAMP.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 AD PIC X(33).
01 FILLER REDEFINES AD PIC X(33).
PROCEDURE DIVISION.
MAIN.
MOVE 'SDFR' TO AD.
DISPLAY AD.
STOP RUN. |
The above program works
but
Code: |
01 FILLER PIC X(20).
01 AD REDEFINES FILLER PIC X(20).
|
Does not works |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
01 AD PIC X(33).
01 FILLER REDEFINES AD PIC X(33).
01 DA REDEFINES AD PIC X(33).
|
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi cobolunni,
In ur code u r redefining AD variable to filler.
But the question is can we redefine filler. |
|
Back to top |
|
|
kavitha81
New User
Joined: 21 Nov 2006 Posts: 6 Location: bangalore
|
|
|
|
Hi,
If the declaration is like this
01 class
02 stdnt pic x(5)
02 filler pic x(5)
01 dpt redefines class pic(10)
Is this possible
regards,
Indu |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Indu,
Yeap it is possible. |
|
Back to top |
|
|
kgumraj
Active User
Joined: 01 May 2006 Posts: 151 Location: Hyderabad
|
|
|
|
Hi,
FILLER is a reserved word. so when you redifine it, at runtime you cant know from which filler it should take the memory. So COBOL doesnt give that option. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi KIran
Thanks for the reply
regards
Arun |
|
Back to top |
|
|
madhumr Warnings : 1 New User
Joined: 18 Oct 2006 Posts: 7 Location: bangalore
|
|
|
|
hi arun u r right we cant redifine a filler |
|
Back to top |
|
|
vijay_bn79
New User
Joined: 20 Nov 2006 Posts: 48 Location: Hyderabad
|
|
|
|
If the declaration is like this
01 class
02 stdnt pic x(5)
02 filler pic x(5)
01 dpt redefines class pic(10)
It is possible |
|
Back to top |
|
|
hey_its_me Warnings : 1 New User
Joined: 23 Aug 2006 Posts: 14 Location: USA
|
|
|
|
is this possible.
01 ws-d.
05 x pic x(04).
05 y pic x(04).
01 filler redefines ws-d.
05 xx pic x(02).
05 xy pic x(02).
05 yx pic x(02).
05 yy pic x(02).
if we doesnt want this group variable to be used for any purpose but if we are concerned on the elementary.. cant we use it in this manner.
with regards,
Anil |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi Anil
Yes it is possible.But you dont have to go for redefines if your requirement is like this.
You can have a structure like this
Code: |
01 ws-d.
05 x.
10 xx pic x(02).
10 xy pic x(02).
05 y.
10 yx pic x(02).
10 yy pic x(02). |
Thanks
Arun |
|
Back to top |
|
|
|