Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CCOPY verb in COBOL to copy

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

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Tue Feb 17, 2009 5:08 pm    Post subject: CCOPY verb in COBOL to copy
Reply with quote

Hi,

While analyzing some programs I found 'CCOPY" verb is used to copy the copybook.

The programmer has used this CCOPY in linkage section.

Could anyone explain what is 'CCOPY' and how it can be used ?


Regards,

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

muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Tue Feb 17, 2009 5:18 pm    Post subject:
Reply with quote

Please post the piece of code.
My guess is there is no verb called CCOPY in COBOL.
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Tue Feb 17, 2009 5:24 pm    Post subject:
Reply with quote

Hi,

Please see the below code for reference :

LINKAGE SECTION.

01 L-FUNCTION-CODE PIC X(01).
88 L-FUNCTION-INITIAL VALUE 'I'.
88 L-FUNCTION-MAIN-PROCESS VALUE 'P'.
88 L-FUNCTION-FINAL VALUE 'F'.

01 L-CLAIM-RECORD.
04 L-CLAIM-RDW PIC X(04).
01 CCOPY HNRYC008 PREFIX L ALL.

EJECT
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Tue Feb 17, 2009 5:52 pm    Post subject:
Reply with quote

How is this used in program?
What is HNRYC008?

Not sure whether this can help you,when i googled for CCOPY as verb,it shows a verb in SAS as CCOPY

http://support.sas.com/documentation/cdl/en/graphref/59607/HTML/default/greplay-ccopy-statement.htm
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Tue Feb 17, 2009 6:12 pm    Post subject:
Reply with quote

Hi,

HNRYC008 is a copybook.

Actually as per business this is the layout for the input file. But there are no FD entries for that file.

In procedure division, without reading a file directly the value from the variable from copybook is moved to output file variable.

Thats why its kinda confusing.

Regards,

Ranjit
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Tue Feb 17, 2009 8:21 pm    Post subject:
Reply with quote

Definitely not a COBOL sentence.
Can you check if this kind of program, when compiled, has to pass through some kind of preprocessor ?
Back to top
View user's profile Send private message
ykishor
Currently Banned

New User


Joined: 11 Aug 2007
Posts: 24
Location: my pc

PostPosted: Tue Feb 17, 2009 9:35 pm    Post subject:
Reply with quote

this is not a COBOL verb... i guess some kind of sub routine(it could even be an assembler routine) gets invoked when this particular program is compiled and executed.

I would sugesst u to search for this in the compile listing of the program..
if u get something let me know... icon_exclaim.gif
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 Feb 18, 2009 12:56 am    Post subject:
Reply with quote

Hello,

Code:
LINKAGE SECTION.

01 L-FUNCTION-CODE PIC X(01).
88 L-FUNCTION-INITIAL VALUE 'I'.
88 L-FUNCTION-MAIN-PROCESS VALUE 'P'.
88 L-FUNCTION-FINAL VALUE 'F'.

01 L-CLAIM-RECORD.
04 L-CLAIM-RDW PIC X(04).
01 CCOPY HNRYC008 PREFIX L ALL.
What does this part of the code look like in the output of the compile?
Back to top
View user's profile Send private message
ykishor
Currently Banned

New User


Joined: 11 Aug 2007
Posts: 24
Location: my pc

PostPosted: Wed Feb 18, 2009 4:27 pm    Post subject:
Reply with quote

Hello

The code looks exactly the same icon_smile.gif.....but the compile listing can provide a wealth of information about the program...any external calls/code expansions can be found through the offset information....also all the libraries refrenced by the program can be found...that's why i suggested that this could be found in the compile listing.... if that's an external call that can be definately found.
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 Feb 18, 2009 9:39 pm    Post subject:
Reply with quote

Hello,

Quote:
The code looks exactly the same
Hopefully, not. . . Hopefully, the expansion of the ccopy would be seen. . .
Back to top
View user's profile Send private message
ykishor
Currently Banned

New User


Joined: 11 Aug 2007
Posts: 24
Location: my pc

PostPosted: Wed Feb 18, 2009 10:37 pm    Post subject:
Reply with quote

could not get you sir... wish to know your views
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 Feb 19, 2009 1:00 am    Post subject:
Reply with quote

Hello,

Quote:
could not get you sir...
It is my suspicion that this (01 CCOPY HNRYC008 PREFIX L ALL. ) is expanded at some point - it might might be from a pre-processor or something like Metacobol.

Quote:
01 CCOPY HNRYC008 PREFIX L ALL.
If Ranjit posts more/useful information we may be able to offer suggestions. As it is now, we're just groping in the dark
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Thu Feb 19, 2009 9:08 pm    Post subject:
Reply with quote

Hi,

Sorry for the delayed reply.

Thanks for the valuable suggestions.

I checked in the compile listing, below are the findings :

1. CCOPY is has nothing to do with COBOL. Its used only in my company(Assumption) .

2. The macro used in compile JCL expands the copybook. Thus this CCOPY is used by th macro which is used in provided compile JCL.

3. It function in the same way as COPY verb.

Thanks,

Ranjit
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 Feb 19, 2009 10:09 pm    Post subject: Reply to: CCOPY verb in COBOL to copy
Reply with quote

Thanks for the update icon_smile.gif

d
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 syncsort: copy lines after the keyword shreya19 SYNCSORT 3 Fri Dec 02, 2016 9:47 am
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us