× 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.



Geo,

Look at the ALWNULL H-Spec

Look at the BIF %NULLIND

and lastly

Using indicators on the KLIST to indicate null status.

>>> vitekg@ctpf.org 03/05/02 10:13AM >>>
Eric ... Thanks alot for your response.  I really goofed tho... Other than the
package I refer to, we do use RPG/IV or RPG/ILE, not RPGII or III as I implied.
You are quite correct...If the package does not use RPG/IV, it may not be
viable. You did however answer my questions. The vendor controls the usage of
nulls. The vendor elected to use nulls in this particular part of the system, so
we must comply. Using SQL, simply not sepcifying a field for output (assuming
its default is null) will result in a null value for that field. I'll have to
look up in RPGIV to see if there is a *NULL value which can be assigned to a
field.
Thanks again.. Geo Vitek

"DeLong, Eric" wrote:

> George,
>
> Wow.... Sounds like you've got a *TON* of work ahead of you...... Good luck.
>
> A1) SQL files are fully compatible with RPG, as ALL database files on the
> iSeries are managed by DB2/400.  However, RPGIV is by far the most
> compatible language for working with SQL data.  Field size limitations are a
> concern in RPGII and RPGIII, as are null, date, time, timestamp, etc. data
> types.  RPGIV opens up a lot of new capability that was difficult and/or
> impossible to support in earlier versions of RPG.
>
> A2) I think at a minimum, you must be using RPGIII (RPG/400) to support
> date, time, timestamp, varying length character, and null data support.
> However, working with some of these in RPGIII can be like pulling your teeth
> out.  Pretty painful and requires a LOT of compiler options.  Support is
> often too minimal to be really helpful (as in date-time types).  Again,
> RPGIV really opens up a lot of options when dealing with SQL database files.
>
> A3) Nulls.... A null field, technically, has no value.  That's why we have
> to use a null indicator to tell us when a field is null.  Valid data *MAY*
> exist in a null field (as in date fields), which means if we must support
> null data, we have to explicitly test the state of the null indicator before
> we use the field in any calculations or reports.  Nulls are tricky, even in
> RPGIV, and I'd advise you to consider if you really need them in your apps.
>
> A4) Not really sure.  You can perhaps use operations navigator to get to
> that information.  You may be able to use the SQL system catalog database to
> access this information as well.
>
> I am not sure that any RPGII code will be acceptable.  RPGII does not allow
> for external data definition, nor will it support many data types that are
> common in SQL databases.  I think I'd again recommend RPGIV as it gives you
> much better support for SQL only applications.  I not sure if Embedded SQL
> is even possible in RPGII, so that probably leaves you out right there. You
> have a lot of points to consider, many of which I didn't even mention, so
> don't leap to any quick conclusions.  Best of luck...
>
> Eric DeLong
> Sally Beauty Company
> MIS-Sr. Programmer/Analyst
> 940-898-7863 or ext. 1863
>
> -----Original Message-----
> From: George J. Vitek [mailto:vitekg@ctpf.org]
> Sent: Tuesday, March 05, 2002 9:43 AM
> To: rpg400-l@midrange.com
> Subject: RPG, RPG400, & SQL
>
> --
> [ Picked text/plain from multipart/alternative ]
> I have what I hope are some basic questions re: creating/maintaining
> files created and used by SQL.
>
> Some background work performed thus far:
> A) CREATE TABLE  results in  PF's
> B) Create index results in a LF's
> C) Have run some SQL against DDS created files,( input & output) no
> problems so far. Very simple functions however.
>
> Questions:
> 1) Can RPG, RPGII, RPGIV be used to populate tables created via SQL,
> some  having Indexes?
> 2) Some values such as TIMESTAMP do not exist in RPGII. I assume these
> can be built to look like a SQL or RPGIV results. The reason for asking
> this is that I would like to use a conversion package to populate SQL
> created files from existing AS/400 database files. This package
> generates RPGII programs to move the data around, not RPGIV, but the
> package has very many "Conversion Task Features" that make it a good
> candidate for a file conversion tool.
> 3) What is the value of Numeric NULL?  Alpha NULL?
> 4) Is there any way to print  Filename alisas's generated for long names
> by Create Table? DSPFD to an Outfile does not seem to do it. (V3R2)
>
> The bottom line is that I would like to use this file conversion package
> which generates RPGII programs to perform conversions from DDS created
> database files to SQL created files. An alternative method is to use
> RPGIV, as this would give access to all features such as TIMESTAMP, DATE
> stuff, etc. The last alternative which should eliminate all questions is
> to utilize SQL to Read and write the files.
>
> The resulting application system will be a totally SQL client server
> system. However, we expect to be able to access for input, any of the
> sql files using RPGIV for inquiry and reporting purposes. We do not
> expect to update the SQL files with anything other than SQL statements,
> but it would be nice to know that we could if there was a need to do so
> ( like a programmer not being familiar with SQL).
>
> RPGIV is a great language. I am assuming we will not eliminate its
> usefulness by going to a SQL based system. Any comments appreciated.
>
> Regards,
>
> George Vitek
> --
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.