hard-coding of SQL in cobol

Other Mainframe related questions which attracts you and there is no suitable Forum you find for it and related FAQs.
Post Reply
Sunil Hyderbad
Registered Member
Posts: 22
Joined: Thu Jan 30, 2014 9:58 am

hard-coding of SQL in cobol

Post by Sunil Hyderbad »

Which term is used to mean hard-coding of SQL in cobol? Could someone guide please.
User avatar
zum13
Registered Member
Posts: 85
Joined: Thu May 04, 2023 12:58 am

Re: hard-coding of SQL in cobol

Post by zum13 »

The term I've always heard and used is "embedded SQL". It's used for C, PL/1, assembler, etc as well and it's certainly the term used in the DB2 manuals. There are two forms. "Static" refers to having fixed SQL statements that can be handled by the precompiler (which gives a performance benefit). "Dynamic" is where the statements are built at run time.
Sunil Hyderbad
Registered Member
Posts: 22
Joined: Thu Jan 30, 2014 9:58 am

Re: hard-coding of SQL in cobol

Post by Sunil Hyderbad »

Thanks zum13. So hard coded is 'embedded SQL'? That's what you mean?
User avatar
zum13
Registered Member
Posts: 85
Joined: Thu May 04, 2023 12:58 am

Re: hard-coding of SQL in cobol

Post by zum13 »

Yes. Any time you've got an "EXEC SQL" in a program, you've got embedded SQL.
Sunil Hyderbad
Registered Member
Posts: 22
Joined: Thu Jan 30, 2014 9:58 am

Re: hard-coding of SQL in cobol

Post by Sunil Hyderbad »

I replied the same in my interview, though not the exact word. But he didn't agree with me.
User avatar
zum13
Registered Member
Posts: 85
Joined: Thu May 04, 2023 12:58 am

Re: hard-coding of SQL in cobol

Post by zum13 »

That's what embedded SQL has meant since I started working with relational databases, and I go back to 1986 and SQL/DS (which is what DB2 for VM used to be called). According to the current DB2 manuals, it's still called that today...

https://www.ibm.com/docs/en/db2-for-zos ... rogramming

I'd be disagreeing with the guy who disagreed with you!
Rahul
Registered Member
Posts: 23
Joined: Thu Jan 23, 2014 9:06 am

Re: hard-coding of SQL in cobol

Post by Rahul »

I think the question is about 'hard coding' and not 'embedded', interviewer was not wrong.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

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

Register

Sign in

Return to “Other Mainframe Topics, Off-Topics, FAQs.”