Page 1 of 1

SQL in a copybook

PostPosted: Fri Jun 26, 2009 5:24 pm
by smaartchap
Hi,

I have a SQL query (that calls a stored proc) in a copybook. In a particular paragraph I gave "COPY <copybook name>" and it compiled fine.

My doubt is - The SQL statements should be INCLUDed and not COPYed.
Can you please explain how the pre-compiler is able to expand the query even though it is used with COPY statement.

Thanks in advance,
Rohaan

Re: SQL in a copybook

PostPosted: Sat Jun 27, 2009 1:41 am
by dick scherrer
Hello,

Suggest you look at how the pre-compiler and the compiler handled the copybook.

If you see something in those outputs that is not clear, post the unclear piece(s) here and someone should be able to clarify.