Page 1 of 2

Can we move values to Filler Clause???

PostPosted: Mon Jan 09, 2012 9:22 am
by vkumarg3
01 A.
05 FILLER PIC X(10).
05 B PIC 9(05).
05 FILLER PIC X(06).

MOVE "GOOD BOY" TO FILLER.

IS THIS CORRECT???.

Re: Can we move values to Filler Clause???

PostPosted: Mon Jan 09, 2012 10:18 am
by dick scherrer
Hello and welcome to the forum,

No, it is not correct - you cannot. Which a simple test would have shown. . .

Also, did you not ask this and get an answer elsewhere recetly?

Re: Can we move values to Filler Clause???

PostPosted: Mon Jan 09, 2012 10:20 am
by dick scherrer
Follow on:

Looking at the bit of code you posted, do you not see a problem for the compiler to determine which FILLER should be the target of the move.

d

Re: Can we move values to Filler Clause???

PostPosted: Mon Jan 09, 2012 1:45 pm
by mongan
You can give the Filler fields values, or you can move spaces (for example) to A, the higher level.

Re: Can we move values to Filler Clause???

PostPosted: Fri Jan 13, 2012 8:55 am
by vkumarg3
Thanks. .
I m just a beginner so only asked basic question. .

Can u jst say me where cud i get article related to this???
i meant complete reference. .:)

Re: Can we move values to Filler Clause???

PostPosted: Fri Jan 13, 2012 10:17 am
by dick scherrer
Hello,

Even a beginner can use proper words / sentences - Lose the kiddie chat-room speak :(

For complete info about COBOL statements read the COBOL Language Reference - here is a link to the Table of Contents:
http://publibz.boulder.ibm.com/cgi-bin/ ... 0/CONTENTS

Notice the MOVE requires a valid "identifier-2" as the receiving field and FILLER is not. The manual may not specify that FILLER is invalid as the receiving field of a MOVE, but the way most manuals work is they document what may be done - if it is not documented as valid, it usually is not.

Re: Can we move values to Filler Clause???

PostPosted: Fri Jan 13, 2012 1:07 pm
by BillyBoyo
Language Reference wrote:FILLER
A data item that is not explicitly referred to in a program. The keyword FILLER is optional. If specified, FILLER must be the first word following the level-number.
The keyword FILLER can be used with a conditional variable if explicit reference is never made to the conditional variable but only to values that it can assume. FILLER cannot be used with a condition-name.
In a MOVE CORRESPONDING statement or in an ADD CORRESPONDING or SUBTRACT CORRESPONDING statement, FILLER
items are ignored. In an INITIALIZE statement, elementary FILLER items are ignored.

If data-name-1 or the FILLER clause is omitted, the data item being described is treated as though FILLER had been specified. [emphases added]


If you are a beginner, try to understand all of this. Try to explain to us the part in italics. I think it would be a good exercise in "how to understand what the manual is saying", which, to me, is always vital.

Re: Can we move values to Filler Clause???

PostPosted: Fri Jan 13, 2012 4:38 pm
by Anuj Dhawan
I thought I'll keep away from this topic, however, could not resist because of the subject title - "Filler Clause" - FILLER can be called as item if just not FILLER but "clause" is pretty meanigless when used in this context.

Re: Can we move values to Filler Clause???

PostPosted: Fri Jan 13, 2012 7:08 pm
by BillyBoyo
I have to say I was surprised to see FILLER called a "keyword" by the manual. Usually "keywords" would be like TIME=(,20) or DSN=...

Re: Can we move values to Filler Clause???

PostPosted: Fri Jan 13, 2012 7:09 pm
by enrico-sorichetti
I have seen a few times <keyword> and <reserved word> being used interchangeably