View previous topic :: View next topic
|
Author |
Message |
Laxminarsimharao
New User
Joined: 08 May 2007 Posts: 26 Location: hyderabad
|
|
|
|
01 WS-COPYBOOK X(8).
01 BATCH-COPY C1234567.
01 ONLIN-COPY C1234567.
In my procedure division I'm using following statements.
IF Batch
MOVE 'BATCH-COPY' to WS-COPYBOOK
ELSE
MOVE 'ONLIN-COPY' to WS-COPYBOOK.
DISPLAY "NAME : " NAME of WS-COPYBOOK.
Will the display statement will work (RUN TIME) for BATCH-COPY and ONLIN-COPY copybooks?
Do we need to change any compiler options to work this one? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If i understand what you are trying to do, no you cannot do it. . .
COPY expands copied source during the compile of a program, not the execution.
If you explain just what you want to accomplish and include an example, someone may have a suggestion.
If i misunderstand, please clarify. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you can start by explaining what this is:
01 BATCH-COPY C1234567.
01 ONLIN-COPY C1234567.
not a valid syntax for anything. |
|
Back to top |
|
|
Laxminarsimharao
New User
Joined: 08 May 2007 Posts: 26 Location: hyderabad
|
|
|
|
Dick Brenholtz, this is typo error.
Original Code will be
01 BATCH-COPY.
COPY C1234567.
01 ONLIN-COPY.
COPY C1234567.
But i got the answer, thanks "d.sch.". |
|
Back to top |
|
|
Suresh Ponnusamy
Active User
Joined: 22 Feb 2008 Posts: 107 Location: New York
|
|
|
|
In my procedure division I'm using following statements.
IF Batch
MOVE 'BATCH-COPY' to WS-COPYBOOK
ELSE
MOVE 'ONLIN-COPY' to WS-COPYBOOK.
You are just moving a name to a variable. It is just a plain move. This will not move the copy book values.
Let us know whether you want to move the name of the copybook or Copy book values. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But i got the answer, thanks "d.sch.". |
You're welcome
Is there any outstanding question or do you have what you need now? |
|
Back to top |
|
|
|