× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hey Jeff,

First OPM COBOL can NOT use SQL as far as I know. I believe you must change
to ILE to use SQL.

In a former life (1 year ago when I was in a COBOL shop) I used ILE and SQL
for new or changed programs. I don't remember any down side to just
changing the source code type from CBL to CBLLE or the SQL version. There
are some things to be careful of if you run in the default activation
group. I just used a named group when I created the programs. When you use
SQL, there is a pre-compiler that examines the source and adds SQL specific
stuff, then calls the ILE compiler.

I saw definate advantages to using ILE alone, and more when I went to SQL.
For example, ILE COBOL has many INTRINSIC FUNCTIONS that can be of great
help. One set I used all the time were the date functions. You can get the
current date as a date data type, use a function to convert your dates from
your files to date data types, then add or subtract days, months and years.
You can find the number of days between dates.

With SQL I took a very complex selection that I needed to do a report on,
created an SQL statement that gave me the records and fields that I wanted
in the order that I needed them, and then my program basicly had to process
the records and put them on the report. I also could check to see if there
were any records to process before even starting the logic to process them
with a summary SQL statment. If it returned zero count, bypass the detail
logic. If it returned a count of 10, then my logic said PERFORM zzz TIMES
where zzz was the variable that contaned the record count. I also could get
a total to put at the top of the report in the header with a summary query,
then process the detail. The management LOVED that. They did not have to
turn to the last page to find how the story ended. It was in the heading of
each page.

The SQL version performed very fast, and was fast to program and implement,
once I got past some PEBCAK errors (Problem Exists Between Chair And
Keyboard).

HTH

Jim
On Fri, May 1, 2009 at 11:55 AM, Jeff Buening <
JeffBuening@xxxxxxxxxxxxxxxxxxx> wrote:

We are mainly an OPM COBOL, CL, DDS file structure shop. Most of our code
is normal I/O. I have no problem using the normal I/O in OPM Cobol, but
have thought about start using more embedded SQL. If we don't change to
DDL file sructure (which I doubt will happen any time soon) is it of any
processing benefit to use embedded SQL in OPM Cobol? If I am making a
change to an OPM Cobol program and it is full of normal I/O, can I add
routines to read, update, delete to those files in embedded SQL without
changing all the other normal I/O routines to SQL? Say the program is
doing normal I/O on a file and I add a routine to use SQL to access it but
leave the normal I/O routine running also, any issue with that?

Thanks,
Jeff
--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing
list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.