IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CCOPY verb in COBOL to copy


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: Canada

PostPosted: Tue Feb 17, 2009 5:18 pm
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
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: Canada

PostPosted: Tue Feb 17, 2009 5:52 pm
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
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: 1353
Location: Israel

PostPosted: Tue Feb 17, 2009 8:21 pm
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
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

Moderator Emeritus


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

PostPosted: Wed Feb 18, 2009 12:56 am
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
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

Moderator Emeritus


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

PostPosted: Wed Feb 18, 2009 9:39 pm
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
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

Moderator Emeritus


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

PostPosted: Thu Feb 19, 2009 1:00 am
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
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

Moderator Emeritus


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

PostPosted: Thu Feb 19, 2009 10:09 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top