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

Update to DB2 from COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
cobolunni

Active User


Joined: 07 Aug 2006
Posts: 127
Location: kerala,india

PostPosted: Sun Feb 25, 2007 3:27 am
Reply with quote

dick scherrer wrote:
This may be way off the mark, but it sounds like you and/or your organization have been awarded or taken on a task that for which you have NO background and/or expertise. If this is correct, someone needs to inform your client and/or management that before you can perform the DB2 work properly, you have to learn the basics.

Dear dick i am a BTECH student in electronics and communication . I am also attending a course on mainframe computer's.
You told that COBOL can update db2 tables. You are telling that in the basis of work on a mainframe computer's But mainframe is not the only machine which can use COBOL. COBOL is a programming language that can be used in any system. I am using Linux in my PC and uses opencobol to done my experiments with COBOL. That language doesn't have any native statements to deal with data base. Also as umaysen said this talk is unnecessary. As you said as a developers point of view he can do the db2 updating with COBOL
dick scherrer wrote:

A couple of times i've asked, received no reply, and will now ask again. . .
Quote:
What kind of CALLs did you replace the SQL with?

and
Quote:
What calls did you have to put in your code? Might these be the same thing the pre-compiler generates?

Dick i am using open cobol to compile cobol in Linux. Open COBOL uses gcc( a c compiler--also compiles c++ etc) . But gcc will not able to compile COBOL but open COBOL compiler converts COBOL program to C program and uses gcc to compile
now a question:
Can you say that GCC can compile COBOL?
I think the answer is no? then COBOL will not able to update db2 directly.
Precompiler extracts the code between EXEC SQL and END-SQL and compiles the SQL statements and creates a binary form of SQL and gives a name .Now the COBOL source is modified by CALL to that binary file, That is the call i mentioned:
If gcc can compile COBOL program then COBOL can update DB2?
Dick it's nice to talk with you. Actually i am interested in web application development that includes Linux Apache Php and Mysql
I am discussing here about mainframe is because i love mainframe technology. Not because i need some technical support to make money easily
Thanks
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sun Feb 25, 2007 4:21 am
Reply with quote

cobolunni wrote:
now a question: Can you say that GCC can compile COBOL? I think the answer is no?
cobolunni wrote:
but open COBOL compiler converts COBOL program to C program and uses gcc to compile
then COBOL will not able to update db2 directly.

icon_confused.gif
Quote:
Precompiler extracts the code between EXEC SQL and END-SQL and compiles the SQL statements and creates a binary form of SQL and gives a name
icon_confused.gif Translates, not compiles!
Quote:
Now the COBOL source is modified by CALL to that binary file
Yea, the API you mentioned so eloquently earlier
Quote:
That is the call i mentioned:
If gcc can compile COBOL program then COBOL can update DB2?
icon_confused.gif GCC, I thought this was a COBOL question?
Quote:
Actually i am interested in web application development that includes Linux Apache Php and Mysql
Good
Quote:
I am discussing here about mainframe is because i love mainframe technology.
Good
Quote:
Not because i need some technical support to make money easily
icon_confused.gif That was either very altruistic or somewhat of a personal affront. I do not know which, but I'll assume the former.
Quote:
Thanks
And thank you.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Feb 25, 2007 4:38 am
Reply with quote

Hi cobolunni,

Well, your reply surely makes things more clear.

While this thread has enjoyed many exchanges, it was not until just now that i came to the realization that we were not all talking about IBM Mainframe COBOL icon_surprised.gif

Yes, what you say is true for some situations - some others have pre-compilers. . . It is always a good idea to mention the environment you are working in if your environment is not the same as the forum where the discussion is gong on icon_smile.gif

Just an fyi, in addition to many years of mainframe support, i've also performed system/database admin on both UNIX and NT platforms (most of my sites are getting more and more into multi-platform). I've not yet ventured into Linux. . . If you are interested, MICRO-FOCUS COBOL works very well on both unix and nt. Opencobol will be good to learn with.

Good luck with your studies, be well, and come back to visit again icon_wink.gif
Back to top
View user's profile Send private message
cobolunni

Active User


Joined: 07 Aug 2006
Posts: 127
Location: kerala,india

PostPosted: Sun Feb 25, 2007 4:55 am
Reply with quote

William Thompson wrote:
Translates, not compiles!


SQL is a set of statements , Which is converted to binary format after some syntax checking-- Is that is compiling
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sun Feb 25, 2007 5:00 am
Reply with quote

Regarding mainframe COBOL and SQL:
SQL is a set of statements , which is converted to COBOL format after some syntax checking-- That is translating. icon_rolleyes.gif
Back to top
View user's profile Send private message
cobolunni

Active User


Joined: 07 Aug 2006
Posts: 127
Location: kerala,india

PostPosted: Sun Feb 25, 2007 12:42 pm
Reply with quote

William Thompson wrote:
Regarding mainframe COBOL and SQL:
SQL is a set of statements , which is converted to COBOL format after some syntax checking-- That is translating. icon_rolleyes.gif

SQL never converted to COBOL format, its converted to a separate binary format and using cobol CALL statement we are calling that binary package
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sun Feb 25, 2007 12:55 pm
Reply with quote

cobolunni wrote:
SQL never converted to COBOL format, its converted to a separate binary format and using cobol CALL statement we are calling that binary package
Right, the API....That is what the translated SQL code in the COBOL program accesses via the COBOL CALL verb.
It almost sounds like you are beginning to understand.... icon_lol.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top