View previous topic :: View next topic
|
Author |
Message |
rohin
New User
Joined: 29 Apr 2005 Posts: 21 Location: Gurgaon, India
|
|
|
|
Hi,
In one of the existing Cobol programs, I saw command:
COPH LOGACTW.
Where LOGACTW is a copybook.
Could anyone please explain what exactly does COPH do and how is it different from normal cobol COPY command?
Thanks,
Rohin |
|
Back to top |
|
|
yogeshwar_ade
Active User
Joined: 31 Aug 2006 Posts: 103 Location: INDIA
|
|
|
|
I hope it must COPY, not a COPH??? Is this code is runing??? |
|
Back to top |
|
|
yogeshwar_ade
Active User
Joined: 31 Aug 2006 Posts: 103 Location: INDIA
|
|
|
|
yogeshwar_ade wrote: |
I hope it must COPY, not a COPH??? Is this code is runing??? |
As its in existing code, I wonder how this code is working.
I hope there is no such keyword used in cobol.
Correct me if I am wrong. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
A capital "H" is South Southeast of a capital "Y" on the keyboard.
Suffice to say this is a typo-error. |
|
Back to top |
|
|
piyush_is_here Currently Banned New User
Joined: 28 May 2008 Posts: 2 Location: NOIDA
|
|
|
|
i have never seen anywhere COPH,
plz check the code it can't be compile/run |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
HI,
Quote: |
Suffice to say this is a typo-error. |
That must be Typo error. other wise compile the program and see the result. |
|
Back to top |
|
|
yogeshwar_ade
Active User
Joined: 31 Aug 2006 Posts: 103 Location: INDIA
|
|
|
|
vasanthkumarhb wrote: |
That must be Typo error. other wise compile the program and see the result. |
To avoid these kinds of small typo error, I always make 'HILITE COBOL ON'. If it is COBOL Keyword/Reserve word it will be in RED color (Default Color) else it will be in Green.
Also I hope if you are going to Compile this code it will surely gives Compile error. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
yogeshwar_ade wrote: |
To avoid these kinds of small typo error, I always make 'HILITE COBOL ON'. |
Should I say, it could be site specific, I use "HI COB"...
rohin,
Quote: |
In one of the existing Cobol programs |
if so, you might like to check whether this
is an "active" statement of the program or not. |
|
Back to top |
|
|
yogeshwar_ade
Active User
Joined: 31 Aug 2006 Posts: 103 Location: INDIA
|
|
|
|
Anuj D. wrote: |
Should I say, it could be site specific, I use "HI COB"...
|
'HI COB' is nothing but abbreviation of 'HILITE COBOL'. |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
HI i know its a very old thread , but curiously i just came accorss a live code that has the same statement COPH followed by a copybook name ( the copybook has a SQL statement).
Any clue as to what COPH does ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Post the output of a Clean Compile of this statement. Not the entire compile, just the bits concerning this. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
Without seeing the output requested by dick, another possibility is that COPH might be a reserved word in some of of pre-compile step. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Searched in the DB2 and CICS manuals and COPH is not found.
Possibly it is some other vendor's "front end" . . . |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Did you check the compile listing? Please share the screen shot of that. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Quote: |
Please share the screen shot of that |
No - do not do a screenshot - a cut and paste using the code tags is quicker and more efficient file-size wise. |
|
Back to top |
|
|
jagadishts
New User
Joined: 30 Sep 2019 Posts: 1 Location: India
|
|
|
|
This is not a Typo. COPH is used to copy host variables into EXEC SQL statement block.
EXEC SQL
SELECT VAR1, VAR2 FROM TABLE1
COPH DB001
WHERE VAR3 = XXX
EXEC-END
where DB001 may contain
INTO :WS-VAR1, :WS-VAR2 |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Quote: |
where DB001 may contain |
So you are not sure then and doing a guess work, you can do the same by using COPY/INCLUDE. Do you have a link to the manual which explains COPH?
Besides, Please don't tailgate any old trade, if you want to discuss something then start a new topic.
Moderators, Please lock this topic. |
|
Back to top |
|
|
|