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



I am truly grateful for all the input to this subject.

But it's making me feel as thick as 2 short planks.

Lloyd wrote :
Address execsql "execsql set option commit=*none;"
if rc <> '0' then do
msgid = "SQL"right(strip(abs(sqlcode)),4,'0')
address command "sndpgmmsg msgid(&msgid) msgf(qsqlmsg) msgdta(&sqlerrmc)"
End

But in the example below I read
exit rc

How dos that work ?

I have the IBM guides but not finding them very easy to follow.

This IBM link I find very frustrating :
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzajp/rzajpssrexx.htm

Why does it use that messy <ADDRESS '*COMMAND'> every time ? ( in Lloyd's example it's <address command> )
Joe didn't use this in his example, only for SQL commands.
Does RC have to be set to 0?
What the **** is 11EXECSQL, 12EXECSQL, etc?



-----Message d'origine-----
De : midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de Dave Odom
Envoyé : mardi 22 avril 2008 01:13
À : midrange-l@xxxxxxxxxxxx
Objet : Examples of REXX I'm thinking about putting on some site

Gang,

I thought I'd offer some REXX code for the i5(or the name de jour), one program at a time, and see what you all think. None of this code is super snazzy as I'm not a super or snazzy programmer; I just write stuff that helps me automate "tops on bottoms" tasks. Use freely but I'd like to have some line in your code that says where it came from. The following is a small EXEC that reads a file that contains various object names and submits them to a GRTOBJAUT command. The substring function is to skip the first two insignificant characters in the input file. The TRACE function is active in this program so I can watch it execute and debug. I'll submit more code with increasing complexity as time goes on. And, yep, you can probably create a better way of doing this but it was a quick and dirty.

/* 08/19/07 DaveO Creation */
/*******************************************************************/
TRACE 'r'
/*******************************************************************/
i=0
Do while i <= 114
i=i+1
If i >= 115 then exit
'OVRDBF FILE(STDIN) TOFILE(dodom1/ivrobj) MBR(ivrobj)'
PULL OBJECT1
OBJ1 = SUBSTR(OBJECT1,3)
'GRTOBJAUT OBJ(*ALL/'obj1') OBJTYPE(*ALL) USER(VRS2) AUT(*CHANGE)'
end
exit rc
****************** End of data **************************************
--

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.