Can we move values to Filler Clause???



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Can we move values to Filler Clause???

Postby vkumarg3 » Mon Jan 09, 2012 9:22 am

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???.
vkumarg3
 
Posts: 29
Joined: Fri Jan 06, 2012 9:29 am
Has thanked: 10 times
Been thanked: 0 time

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

 

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

Postby dick scherrer » Mon Jan 09, 2012 10:18 am

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

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

Postby dick scherrer » Mon Jan 09, 2012 10:20 am

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
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

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

Postby mongan » Mon Jan 09, 2012 1:45 pm

You can give the Filler fields values, or you can move spaces (for example) to A, the higher level.
User avatar
mongan
 
Posts: 212
Joined: Tue Jan 11, 2011 8:32 pm
Has thanked: 1 time
Been thanked: 5 times

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

Postby vkumarg3 » Fri Jan 13, 2012 8:55 am

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. .:)
vkumarg3
 
Posts: 29
Joined: Fri Jan 06, 2012 9:29 am
Has thanked: 10 times
Been thanked: 0 time

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

Postby dick scherrer » Fri Jan 13, 2012 10:17 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

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

Postby BillyBoyo » Fri Jan 13, 2012 1:07 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

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

Postby Anuj Dhawan » Fri Jan 13, 2012 4:38 pm

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.
Anuj
Anuj Dhawan
 
Posts: 274
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times

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

Postby BillyBoyo » Fri Jan 13, 2012 7:08 pm

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=...
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

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

Postby enrico-sorichetti » Fri Jan 13, 2012 7:09 pm

I have seen a few times <keyword> and <reserved word> being used interchangeably
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Next

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post