IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is it possible to REDEFINE a FILLER


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Nov 22, 2006 12:47 pm
Reply with quote

Hi

Could anyone please tell me if it is possible to REDEFINE a FILLER .

Thanks
Arun
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Nov 22, 2006 1:14 pm
Reply with quote

Hi Arun,

We cant redefine a filler .
Back to top
View user's profile Send private message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Wed Nov 22, 2006 1:37 pm
Reply with quote

If you try to redefine FILLER
you will get compilation error

Thanks
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Nov 22, 2006 1:50 pm
Reply with quote

Thanks to all

Arun
Back to top
View user's profile Send private message
cobolunni

Active User


Joined: 07 Aug 2006
Posts: 127
Location: kerala,india

PostPosted: Wed Nov 22, 2006 2:04 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Nov 22, 2006 5:42 pm
Reply with quote

01 AD PIC X(33).
01 FILLER REDEFINES AD PIC X(33).
01 DA REDEFINES AD PIC X(33).
icon_question.gif
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Nov 22, 2006 7:35 pm
Reply with quote

Hi cobolunni,

In ur code u r redefining AD variable to filler.
But the question is can we redefine filler.
Back to top
View user's profile Send private message
kavitha81

New User


Joined: 21 Nov 2006
Posts: 6
Location: bangalore

PostPosted: Thu Nov 23, 2006 10:51 am
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Nov 23, 2006 10:58 am
Reply with quote

Hi Indu,

Yeap it is possible.
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Thu Nov 23, 2006 4:53 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Nov 23, 2006 5:37 pm
Reply with quote

Hi KIran

Thanks for the reply

regards
Arun
Back to top
View user's profile Send private message
madhumr
Warnings : 1

New User


Joined: 18 Oct 2006
Posts: 7
Location: bangalore

PostPosted: Thu Nov 23, 2006 8:37 pm
Reply with quote

hi arun u r right we cant redifine a filler
Back to top
View user's profile Send private message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Fri Nov 24, 2006 5:05 pm
Reply with quote

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
View user's profile Send private message
hey_its_me
Warnings : 1

New User


Joined: 23 Aug 2006
Posts: 14
Location: USA

PostPosted: Fri Nov 24, 2006 5:23 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Nov 24, 2006 6:10 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Need to add field to copybook, proble... COBOL Programming 14
No new posts File transfer from host with filler f... TSO/ISPF 15
No new posts Reformatting and adding additional fi... SYNCSORT 6
No new posts Easytrive Redefine CA Products 4
No new posts Redefine SYS1.PROCLIB JCL & VSAM 12
Search our Forums:

Back to Top