Code: Select all
EXEC SQL
INCLUDE DCLMEM
END-EXEC.
Code: Select all
EXEC SQL
INCLUDE DCLMEM
END-EXEC.
Code: Select all
EXEC SQL
INCLUDE DCLMEM
END-EXEC.
Code: Select all
EXEC SQL
INCLUDE DCLMEM
END-EXEC.
I am sorry what are you saying? I did not understand this.Pandora-Box wrote:Also what if you need to change the DCLGEN member value there is a possibility the direct declarations could be missed in direct declarations
I could never understand it from what was posted. Thanks for your efforts. But I still feel a better answer can be there for this question, if I again face it in an interview..nicc wrote:I guess, from carefully reading what Pandor-Box wrote, that what is being said is that if you do not use the pre-compiler generated copybook but use a hand-crafted copybook then, if the pre-compiler creates an updated copybook the change may not be noticed and therefor not made to the hand-crafted copybook leading to processing errors/failure.
So basically there is no harm in using it but it can create problems, that is what the gist of it.Anuj Dhawan wrote:As such you can use a COBOL equivalent copybook instead of DCLGEN member, compiler does not stop you, pre-compiler does not stop you. But you are introducing more maintenance work for yourself,in future. Another mistake which might happen is you might end up using COPY statement for the DCLGEN equivalent copybook and if you do use COPY to expand DB2 DCLGEN members, your program will fail at pre-compilation stage as all the host variables are not defined. This happens because COPY members will get expanded only at Compilation stage and not at Pre-compilation.
Ha ha ha ...Anuj Dhawan wrote:Can I drive a car at 300 km/hr?
The answer is yes, you can. Your mileage (Yes, you read it correct, Your mileage, not of car) may vary!
Is it advisable?
No! per traffic rules, per common sense - no, the answer is no.
Can I still do it?
Yes you can. Society has police. Shops have DBAs and Tech-Leads.
You need to be a member in order to post a reply
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute