View previous topic :: View next topic
|
Author |
Message |
athul009
New User
Joined: 09 Oct 2007 Posts: 7 Location: US
|
|
|
|
Can you move FILLER from Input file Copybook to another variable of Output file ?
For instance, is the following would be valid?
MOVE FILLER OF DME-REPLY-DATA TO <OUTPUT-VARIABLE> .
Please let me know.
Thanks! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
At the top of the page is a link to "IBM Manuals". Among them is the Language Reference for multiple current versions of the compiler.
Look up FILLER in the Language Reference manual and post back here if you find something that is not clear. Someone will be able to clarify.
When you have a question, you should start a new topic for your question rather than post a reply to an inactive, over a year-old topic. |
|
Back to top |
|
|
sudharsan.soundararajan Warnings : 1 New User
Joined: 15 Oct 2008 Posts: 17 Location: Chennai
|
|
|
|
Hi Atul,
Quote: |
MOVE FILLER OF DME-REPLY-DATA TO <OUTPUT-VARIABLE> .
|
This code will not work. You will get a Compilation error as follows
"FILLER" was found in the "MOVE" statement.The statement was discarded. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Atul,
Think about it for a minute. You can possibly have hundreds of FILLER fields in your pgm. How do you differentiate?
That's probably why IBM and the folks at ANSI/ISO "outlawed" FILLERs in COBOL stmts. |
|
Back to top |
|
|
athul009
New User
Joined: 09 Oct 2007 Posts: 7 Location: US
|
|
|
|
Thanks for your answers, all!!
mmwife::<<You can possibly have hundreds of FILLER fields in your pgm. How do you differentiate? >>
Well, I had mentioned something like following :
MOVE FILLER OF DME-REPLY-DATA TO <OUTPUT-VARIABLE>.
So, I was hoping, it would be something similar to
MOVE 05-level-Var OF 01-level-Var TO <OUTPUT-VARIABLE>
That is how it differentiate between Similar named 05 level variables ( based on OF syntax. Hope this is clear to you.
As it does not allow the FILLER, I will modify the input copybook to WS-IN-FILLER in place of FILLER. And then, I should be able to move WS-IN-FILLER to WS_OUT-FILLER. Thanks again to all !!!! |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
If it is being used it should not be named FILLER. It would be much better to name it something that indicates its use. If it is not being used why do you need to move it? |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
Well, I had mentioned something like following :
MOVE FILLER OF DME-REPLY-DATA TO <OUTPUT-VARIABLE>.
So, I was hoping, it would be something similar to
MOVE 05-level-Var OF 01-level-Var TO <OUTPUT-VARIABLE> |
athul009,
We can hope only if a single FILLER was allowed within a group item. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
<<You can possibly have hundreds of FILLER fields in your pgm. How do you differentiate? >>
|
You don't. . .. FILLER is only used when there is no need to refer to the field directly (by name). |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Athul,
If you need those value to be used you can Redefine the FILLER like as follows.
03 VAR-A REDEFINES FILLER
05 VAR-1 pic x(nn).
But it should be immediately after the FILLER declaration.
Than you can use it as
MOVE VAR-1 TO NEW-VAR. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
I would suggest you try this before you offer it as advice.
Try it and let us know how well it works!
hemanth.nandas wrote: |
Athul,
If you need those value to be used you can Redefine the FILLER like as follows.
03 VAR-A REDEFINES FILLER
05 VAR-1 pic x(nn).
But it should be immediately after the FILLER declaration.
Than you can use it as
MOVE VAR-1 TO NEW-VAR. |
|
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hello,
We have many applications and which have been declared and worked fine.
Even I had used many times before and worked fine. So, it isn't required me to test it again.
Thanks for suggestion. |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Sorry, I again checked but I am wrong with this. We can Redefine a Variable to FILLER and not a Filler. I juct confused. Sorry for this.
And thanks to Craq. |
|
Back to top |
|
|
|