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
 
changing the Copybook name at RUN TIME???

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

New User


Joined: 08 May 2007
Posts: 26
Location: hyderabad

PostPosted: Wed Jul 09, 2008 2:38 am    Post subject: changing the Copybook name at RUN TIME???
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Wed Jul 09, 2008 2:54 am    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Wed Jul 09, 2008 11:13 am    Post subject:
Reply with quote

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
View user's profile Send private message
Laxminarsimharao

New User


Joined: 08 May 2007
Posts: 26
Location: hyderabad

PostPosted: Thu Jul 10, 2008 4:54 am    Post subject: Reply to: changing the Copybook name at RUN TIME???
Reply with quote

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
View user's profile Send private message
Suresh Ponnusamy

Active User


Joined: 22 Feb 2008
Posts: 107
Location: New York

PostPosted: Thu Jul 10, 2008 9:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu Jul 10, 2008 10:00 pm    Post subject:
Reply with quote

Hello,

Quote:
But i got the answer, thanks "d.sch.".
You're welcome icon_smile.gif

Is there any outstanding question or do you have what you need now?
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 Comparision with current time arunsoods DFSORT/ICETOOL 5 Thu Nov 09, 2017 10:37 am
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm

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