Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is it possible to REDEFINE a FILLER

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Arun Raj

Moderator


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

PostPosted: Wed Nov 22, 2006 12:47 pm    Post subject: Is it possible to REDEFINE a FILLER
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: 1187
Location: Bangalore,India

PostPosted: Wed Nov 22, 2006 1:14 pm    Post subject:
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    Post subject:
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: 2284
Location: @my desk

PostPosted: Wed Nov 22, 2006 1:50 pm    Post subject: Re: Is it possible to REDEFINE a FILLER
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: 128
Location: kerala,india

PostPosted: Wed Nov 22, 2006 2:04 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Wed Nov 22, 2006 5:42 pm    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Wed Nov 22, 2006 7:35 pm    Post subject:
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    Post subject: Re: Is it possible to REDEFINE a FILLER
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: 1187
Location: Bangalore,India

PostPosted: Thu Nov 23, 2006 10:58 am    Post subject:
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    Post subject: Re: Is it possible to REDEFINE a FILLER
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: 2284
Location: @my desk

PostPosted: Thu Nov 23, 2006 5:37 pm    Post subject:
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    Post subject: u r right
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    Post subject: Re: Is it possible to REDEFINE a FILLER
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    Post subject:
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: 2284
Location: @my desk

PostPosted: Fri Nov 24, 2006 6:10 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Easytrive Redefine vidyaa CA Products 4 Mon Jun 19, 2017 6:01 pm
No new posts Redefine SYS1.PROCLIB farhad_evan JCL & VSAM 12 Mon May 22, 2017 10:54 pm
No new posts Redefine Numeric to Alphanumeric suraaj COBOL Programming 4 Mon Oct 06, 2014 9:16 pm
No new posts COPY BOOK with FILLER Chetan Kumar COBOL Programming 14 Sat May 31, 2014 7:58 pm
No new posts Initializing filler default value whe... dsivapradeep COBOL Programming 6 Thu Feb 13, 2014 11:17 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us