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

COBOL-Common routine that contains all SQLs for a table


IBM Mainframe Forums -> COBOL Programming
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Madhubalan Periyasamy

New User


Joined: 09 Aug 2021
Posts: 1
Location: Sweden

PostPosted: Mon Aug 09, 2021 4:13 pm
Reply with quote

Has anyone worked on a project where you have written a code with similar specifications writtten below?
If yes, can you share your experience on how good or bad this is compared to the traditional approach of embedding the SQL directly in a module?
SPEC:
Lets assume that we have a table called EMPLOYEE. and an application written in COBOL.
Instead of embedding the SQL to access this table in every program that has to access this module, we create a sub-module that contains all possible SQL statements (SELECT,UPDATE,DELETE, INSERT) used on that table.
So whenever there is a need to access this table, we just call the sub-module with enough input.
Back to top
View user's profile Send private message
prino
Warnings : 1

Senior Member


Joined: 07 Feb 2009
Posts: 1263
Location: Vilnius, Lithuania

PostPosted: Mon Aug 09, 2021 5:10 pm
Reply with quote

Typical imbecile PHB idea.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2771
Location: NYC,USA

PostPosted: Mon Aug 09, 2021 10:47 pm
Reply with quote

It really doesn’t matter , update , delete operations may have different where conditions which you cannot achieve thru one module unless you build dynamic sqls.
Second , it’s easier and flexible to control sqls if you write your own in the program as per requirements and it works pretty well.

Only in case of vsams I have seen using one I/o module to perform all such operations as it was critical to the application and it’s easier to manage by one module than many programs plus buffering , performance , contention issues reduce to almost none using one module.
Back to top
View user's profile Send private message
prino
Warnings : 1

Senior Member


Joined: 07 Feb 2009
Posts: 1263
Location: Vilnius, Lithuania

PostPosted: Wed Aug 11, 2021 1:22 pm
Reply with quote

If you want replies ask for them here, not in PMs, unless you yourself are the PHB.
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1189

PostPosted: Wed Aug 11, 2021 7:45 pm
Reply with quote

Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts how to convert and use 1 bit hex-numb... COBOL Programming 1
No new posts how to convert and use 1 bit hex-numb... DFSORT/ICETOOL 10
No new posts VB file copy COBOL program gives erro... COBOL Programming 3
No new posts Cobol program to determine the sequen... COBOL Programming 2
No new posts COBOL 6.2 vs 6.3 COBOL Programming 1
Search our Forums:

Back to Top