ClustrMaps

The roadrunner is back as never before! See also: My homepage or my very obsolete site
If by any means entries in my blog are considered to be harmful or damaging, please let me know (add comment) or just mail me. In this (unhopely) case I will remove or change the contents.

Tuesday, February 05, 2008

Rava

Ever heard of Rava?
It's a kind of a practical joke:
it means an odd combination of RPG and Java.
This language is ILE RPG, see this code sample:
PReadNext B
DReadNext PI
/free
exec sql fetch next from trCursor into :transrec:indNull;
/end-free
PReadNext E

Partially free format and semicolon at the line end, like Java.
Partially strict formatted, like good old RPGIII.
If you think Java is complex, then Rava really hits the fan!


Java for RPG Programmers:
http://www.mc-store.com/5234.html

The following links provide access to the manuals,
so nobody can ever blame you of not reading the manuals (RTFM):
http://en.wikipedia.org/wiki/RTFM

All manuals:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp

ILE RPG Reference:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books/sc092508.pdf

Stories about SQLRPG:
http://www.itjungle.com/fhg/fhg030205-story01.html
http://www.itjungle.com/fhg/fhg081005-story01.html

And a nice document describing select/fetch:
http://developer.mimer.com/documentation/Mimer_SQL_Programmers_Manual/Accessing_Dbase_objects2.html
Note: It is advisable always to use an explicit list of items in the SELECT statement of the cursor declaration. The shorthand notations "SELECT *" and "SELECT table.*" are useful in interactive SQL, but can cause conflicts in the variable lists of FETCH statements if the table definition is changed.

And:
Host variables in the variable list correspond in order to the column names specified in the SELECT clause of the cursor declaration. The number of variables in the FETCH statement may not be more than the number of columns selected. The number of variables may be less than the number of columns selected, but a "success with warning"-code is then returned in SQLSTATE.

If the Rava seems to work, you still expect (indeed):
success with warning

Also the indicator variables are explained:
http://developer.mimer.com/documentation/Mimer_SQL_Programmers_Manual/Communicating_with_app2.html#1112516
In embedded SQL, indicator variables associated with main variables are used to handle NULL values in database tables.

See also this blog-entry:
http://joscoenen.blogspot.com/2008/01/much-ado-about-nothing-interesting.html

1 comment:

D'niker said...

Hee Jos, klinkt een beetje cynisch. Lijkt mij dat er problemen zijn met de RPG backend.

En van dat select * of select (lijstje velden) had ik je toch al vertelt, toch!? Dat hadden we proef ondervindelijk vastgesteld.

CU

Blog Archive