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
 
Overriding copy book variables

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

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Fri Apr 25, 2008 9:24 am    Post subject: Overriding copy book variables
Reply with quote

I have a copybook "HELLO"

Which has 01 bcd
05 bcx pic 9(4)
05 bcr pic x(4) ….etc

But I want the copy book to expand as shown when I compile it…..

01 bcd-X
05 bcx-X pic 9(4)
05 bcr-X pic x(4) ….etc
i.e it should be suffixed with ‘-X’

Can anyone help me in this...

Nelson
Back to top
View user's profile Send private message

sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Fri Apr 25, 2008 10:41 am    Post subject: Re: COPY BOOK ISSUE in mainframe
Reply with quote

nelson.pandian wrote:
I have a copy book say HELLO

Which has 01 bcd
05 bcx pic 9(4)
05 bcr pic x(4) ….etc

But I want the copy book to expand as shown when I compile it…..

01 bcd-X
05 bcx-X pic 9(4)
05 bcr-X pic x(4) ….etc
i.e it shud be suffixed with ‘-X’

Can any one help me in this...

Thanks in advance,
Nelson


Code:

If ur copy book is like this ie having common qualifier.

01 copy1-bcd
    05  copy1-bcx           pic 9(4)
    05  copy1-bcr            pic x(4) ….etc 

Then u can replace copy1 with copy1-x in ur program.Then u can see

01 copy1-x-bcd
    05  copy1-x-bcx           pic 9(4)
    05  copy1-x-bcr            pic x(4) ….etc  in ur compiler listings
Back to top
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Fri Apr 25, 2008 2:50 pm    Post subject:
Reply with quote

I think you didn't get me.
Say for Example:
In ADSO we can Prefix or Suffix a variable which is present a record in IDDM, and we can use those prefixed or suffixed variable in the dialog.

IDDM structure:
Prefix variable: WS01-

01 REF
02 REC1 PIC X(02)
02 REC2 PIC X(02)

While using in a dialog we use to use as WS01-REC1 and WS01-REC2.

In the same way can we use the variables with a prefix or Suffix which is in the Copybook used by a Cobol Program.
Back to top
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Fri Apr 25, 2008 2:54 pm    Post subject:
Reply with quote

Is there anyothere way of using the Prefix or Suffix with Replace or Redefine or Renames, something like.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Apr 25, 2008 7:25 pm    Post subject:
Reply with quote

nelson.pandian wrote:
Is there anyothere way of using the Prefix or Suffix with Replace or Redefine or Renames, something like.
No, whole woeds only....
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Apr 28, 2008 8:10 pm    Post subject:
Reply with quote

Hi Nelson,

This should work.

In copybook:

01 bcd:suf:.
05 bcx:suf: pic 9(4).
05 bcr:suf: pic x(4).

In pgm:

copy hello replacing ==:suf:== by ==-x==.

If you don't want the -x, code:

copy hello replacing ==:suf:== by ====.
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 XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm

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