Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
What is the use of FILLER in cobol programming...

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

New User


Joined: 13 Sep 2007
Posts: 3
Location: INDIA

PostPosted: Fri Sep 14, 2007 10:04 am    Post subject: What is the use of FILLER in cobol programming...
Reply with quote

Could anyobdy expalin me the user of FILLER

01 FILLER PIC X(9).
Back to top
View user's profile Send private message

agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Fri Sep 14, 2007 10:32 am    Post subject:
Reply with quote

user of filer? icon_confused.gif or Uses of filler?
Did you face any interview question like that?

FILLER can be used to align numeric variables to word boundaries for performance improvement.

When you intialize a group variable, filler fields are unaffected. This can be used to our advantage. for example in date fields-
Code:
01 date-fl.
   05 mm pic xx.
   05 filler pic x value '/'.
   05 dd pic xx.
   05 filler pic x value '/'.
   05 yy pic xx.

By declaring this variable we need not move '/' as a separator even if we use and initialize date-fl in program many times.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri Sep 14, 2007 12:06 pm    Post subject:
Reply with quote

daks,

Generally FILLER is used for creating SLACK BYTES.
Back to top
View user's profile Send private message
daks

New User


Joined: 13 Sep 2007
Posts: 3
Location: INDIA

PostPosted: Fri Sep 14, 2007 2:23 pm    Post subject:
Reply with quote

thanks for reply...
but i got a code where FILLER used in the following way..
i cant understand this...
please help me out?


WS-ORD-DATE PIC 9(08) VALUE ZEROES.
FILLER REDEFINES WS-ORD-DATE.
10 WS-ORD-DATE-CC PIC 9(02).
10 WS-ORD-DATE-FMT PIC 9(06).
10 FILLER REDEFINES WS-ORD-DATE-FMT.
15 WS-ORD-DATE-YY PIC 9(02).
15 WS-ORD-DATE-MM PIC 9(02).
15 WS-ORD-DATE-DD PIC 9(02).
Back to top
View user's profile Send private message
chiranjeevi_mca

New User


Joined: 19 Feb 2006
Posts: 27

PostPosted: Fri Sep 14, 2007 3:18 pm    Post subject: Reply to: What is the use of FILLER in cobol programming...
Reply with quote

Hi

Filler is the purpose of declaring the variable with out specify any name.

Ex:

01 Todays-Date
02 Todays-CCYY Pic X(4)
02 Filler Pic X(1) Value '/'
02 Todays-MM Pic x(2)
02 Filler Pic X(1) Value '/'
02 Todays-DD Pic x(2)

move '2007' to Todays-CCYY
move '09' to Todays-MM
move '14' to Todays-DD

Display Todays-Date
It display's '2007/09/14'. It occupies the size of 10 bytes.

In Your Example:

WS-ORD-DATE is the Numeric Variable and size is 8 bytes.

FILLER REDEFINES WS-ORD-DATE means :
The Programmer using the same memory of WS-ORD-DATE and the expanded dataitems for filler will use to change the values.

10 WS-ORD-DATE-CC PIC 9(02).
10 WS-ORD-DATE-FMT PIC 9(06).
10 FILLER REDEFINES WS-ORD-DATE-FMT.
15 WS-ORD-DATE-YY PIC 9(02).

Ex: If the value of WS-ORD-DATE is '20070914'
Then If you want to display the Century
Display WS-ORD-DATE-CC. It display's 20
Display WS-ORD-DATE-YY . It display's 07

Like that it will be useful

Regards,
Chiranjeevi.
Back to top
View user's profile Send private message
daks

New User


Joined: 13 Sep 2007
Posts: 3
Location: INDIA

PostPosted: Fri Sep 14, 2007 6:18 pm    Post subject:
Reply with quote

its ok now.....
thanks chiranjeevi................
Back to top
View user's profile Send private message
dr_te_z

New User


Joined: 08 Jun 2007
Posts: 71
Location: Zoetermeer, the Netherlands

PostPosted: Sun Sep 16, 2007 2:44 am    Post subject: Re: What is the use of FILLER in cobol programming...
Reply with quote

daks wrote:

01 FILLER PIC X(9).

Bad example. Filler is never used at 01 or 77 levels.
Back to top
View user's profile Send private message
ulfnsc

New User


Joined: 15 Jan 2004
Posts: 19
Location: Stockholm, SWEDEN

PostPosted: Mon Sep 17, 2007 7:43 pm    Post subject: Reply to: What is the use of FILLER in cobol programming...
Reply with quote

Never say never...
I have seen it in many programs....
Uffe
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Sep 17, 2007 7:48 pm    Post subject:
Reply with quote

77 levels might be hard to justify as FILLER, but 01 are quite often FILLER (usually without the VALUE)....
Back to top
View user's profile Send private message
lcmontanez

New User


Joined: 19 Jun 2007
Posts: 50
Location: Chicago

PostPosted: Mon Sep 17, 2007 9:05 pm    Post subject: Reply to: What is the use of FILLER in cobol programming...
Reply with quote

FYI, you don't need to code filler with the latest cobol compiler in some situations

01 Pic X will work.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Sep 17, 2007 9:52 pm    Post subject:
Reply with quote

Hello,

Quote:
but 01 are quite often FILLER
This is quite common with the FILLER redefines another 01 but doesn't need a name. . .
Back to top
View user's profile Send private message
dr_te_z

New User


Joined: 08 Jun 2007
Posts: 71
Location: Zoetermeer, the Netherlands

PostPosted: Tue Sep 18, 2007 11:27 am    Post subject:
Reply with quote

CICS Guy wrote:
but 01 are quite often FILLER (usually without the VALUE)....
You've done it. You made me curious. Can you give some sample code how to use a "01 filler" definition?
Back to top
View user's profile Send private message
ulfnsc

New User


Joined: 15 Jan 2004
Posts: 19
Location: Stockholm, SWEDEN

PostPosted: Tue Sep 18, 2007 12:26 pm    Post subject: Filler in 77 and 01
Reply with quote

Code:

013400 WORKING-STORAGE SECTION.                           
013500 77  FILLER                  PIC X(32)      VALUE   
013600              'WWWWWWWWWW  LU001  WWWWWWWWWWWWW'.   

and
Code:

016100 01  DATUM                       PIC 9(8).           
016200 01  FILLER   REDEFINES          DATUM.               
016300     05       DATUM-SS           PIC 99.             
016400     05       DATUM-AA           PIC 99.             
016500     05       FILLER             PIC 9(4).           
016600 01  KODER.                                           
016700     05       DUMP               PIC X      VALUE 'E'.
016800     05       FELKOD             PIC S9(5)  COMP-3.   
016900*                                                     
017000 01  W-SKILLNAD-SEK                  PIC 9(8).       
017100 01  FILLER       REDEFINES W-SKILLNAD-SEK.           
017200     15  W-Z410-SS                   PIC 99.         
017300     05  W-SKILLNAD                  PIC 9(6).       
017400     05  FILLER   REDEFINES W-SKILLNAD.               
017500         10       W-Z410-AR-MAN.                     
017600          15      W-Z410-AR          PIC 99.         
017700          15      W-Z410-MAN         PIC 99.         
017800         10       W-Z410-DAG         PIC 99.         


This is from a online program (IMS) dated from 1981 and still running..
Uffe
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 1:44 pm    Post subject: Re: Filler in 77 and 01
Reply with quote

ulfnsc wrote:
This is from a online program (IMS) dated from 1981 and still running.
Works for me....grin.....
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us