If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Cobol

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-28-03, 08:16
arunchp arunchp is offline
Registered User
 
Join Date: Nov 2003
Location: India
Posts: 22
Wink Cobol

Subroutine in COBOL

Is any one give me clear idea about the Subroutines in COBOL. how can we create it?

as for as i have search, I found many coding just shows it as subroutines with out any explanation.

Is any one help me to overcome from this.

thanks in advance

apa
Reply With Quote
  #2 (permalink)  
Old 11-28-03, 17:25
sundialsvcs sundialsvcs is offline
Registered User
 
Join Date: Oct 2003
Posts: 706
In classic COBOL, subroutines are implemented by the PERFORM... and PERFORM...THRU statements. They are not quite classic subroutines. They do not, for example, have local variables. They can be confounded by GOTO statements.

A good textbook on COBOL is pretty much an absolute necessity.

"COBOL! Why did it have to be COBOL?!"
-- Indiana Jones and the Temple of Computers
__________________
ChimneySweep(R): fast, automatic
table repair at a click of the
mouse! http://www.sundialservices.com
Reply With Quote
  #3 (permalink)  
Old 12-01-03, 07:46
arunchp arunchp is offline
Registered User
 
Join Date: Nov 2003
Location: India
Posts: 22
Cobol Subroutine

Actually i have look over the Cobol subroutine code like follows;

CALL 'SQLConnect'
using by content ptrSQLConnect
by content strAUTOCOMMIT
by content bolFALSE
by content 0
by content numINTEGER
giving RetCode

with this code Where can I find the coding written in 'SQLConnect' or the program associated with this string literal?.

can any one helps me overcome this...

thanks in advance

apa.
Reply With Quote
  #4 (permalink)  
Old 12-01-03, 09:58
sundialsvcs sundialsvcs is offline
Registered User
 
Join Date: Oct 2003
Posts: 706
Re: Cobol Subroutine

Quote:
Originally posted by arunchp
Actually i have look over the Cobol subroutine code like follows;

Code:
CALL 'SQLConnect'
                 using by content ptrSQLConnect
                       by content strAUTOCOMMIT
                       by content bolFALSE
                       by content 0
                       by content numINTEGER
                 giving RetCode
with this code Where can I find the coding written in 'SQLConnect' or the program associated with this string literal?.

This is a call to an external library (not written in COBOL, probably) containing the SQL interface software provided by your database management system. The source code probably does not exist. It will be found in a library declared to your compiler/linker when you compile the COBOL program.
__________________
ChimneySweep(R): fast, automatic
table repair at a click of the
mouse! http://www.sundialservices.com
Reply With Quote
  #5 (permalink)  
Old 12-01-03, 09:59
sundialsvcs sundialsvcs is offline
Registered User
 
Join Date: Oct 2003
Posts: 706
Re: Cobol Subroutine

Quote:
Originally posted by arunchp
Actually i have look over the Cobol subroutine code like follows;

Code:
CALL 'SQLConnect'
                 using by content ptrSQLConnect
                       by content strAUTOCOMMIT
                       by content bolFALSE
                       by content 0
                       by content numINTEGER
                 giving RetCode
with this code Where can I find the coding written in 'SQLConnect' or the program associated with this string literal?.

This is a call to an external library (not written in COBOL, probably) containing the SQL interface software provided by your database management system. The source code probably does not exist. It will be found in a library declared to your compiler/linker when you compile the COBOL program.
__________________
ChimneySweep(R): fast, automatic
table repair at a click of the
mouse! http://www.sundialservices.com
Reply With Quote
  #6 (permalink)  
Old 12-02-03, 01:13
arunchp arunchp is offline
Registered User
 
Join Date: Nov 2003
Location: India
Posts: 22
thank you sundialsvcs.

Currently they write this subroutine 'SQLConnect' to connect to DB2. So There is some way to provides SQL interface to establish connection between DB2 and COBOL.

To write such subroutines what we have (must) to know ?

Can you please give me some ideas to create such SQL interface to establish connetion between COBOL and MySQL.?

thanks in advance...

apa.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On