Joined: 02 Dec 2002 Posts: 624 Topics: 175 Location: Stockholm, Sweden
Posted: Tue Jan 03, 2023 10:54 am Post subject: RC 12 from LMMLIST
I wonder if anyone can share any light on what this problem might be caused by.
I use an action bar drop down to show a list of members in a PDS.
The code is as follows (I've deleted the actual trace SAY lines for clarity)
Code:
/*******************************************************************
get a list of the member names in the filename passed in
*******************************************************************/
pdsmemb:
say 'In pdsmemb in 'rname ; trace ?a
Here are the results. First, if I simply start the panel and select the action bar straight away, it fetches all 7 member in the PDS.
Quote:
In pdsmemb in MSDB2UNL
3758 *-* arg dsn
+++ Interactive trace. TRACE OFF to end debug, ENTER to continue. +++
trace off
Line 3760 setting sw_trace to 1
DATA SET S6843F.MSDB2.UNLOAD NOT FREED, DATA SET IS OPEN
Line 3761 FREE DA 'S6843F.MSDB2.UNLOAD' RC = 12
Line 3760 LMINIT on dataset 'S6843F.MSDB2.UNLOAD' RC = 0
Line 3764 LMOPEN on dataid ISR00052 RC = 0
Line 3774 LMMLIST on dataid ISR00052 RC = 0 zerrlm=
Line 3774 LMMLIST on dataid ISR00052 RC = 0 zerrlm=
Line 3774 LMMLIST on dataid ISR00052 RC = 0 zerrlm=
Line 3774 LMMLIST on dataid ISR00052 RC = 0 zerrlm=
Line 3774 LMMLIST on dataid ISR00052 RC = 0 zerrlm=
Line 3774 LMMLIST on dataid ISR00052 RC = 0 zerrlm=
Line 3774 LMMLIST on dataid ISR00052 RC = 0 zerrlm=
Line 3774 LMMLIST on dataid ISR00052 RC = 8 zerrlm=No more members in this data
set.
Line 3783 LMCLOSE on dataid ISR00052 RC = 0
Line 3786 LMFREE on dataid ISR00052 RC = 0
and now if I first run code that accesses a DB2 table (in the same machine as the Rexx code) and writes whatever is extracted to an output file.
Quote:
In pdsmemb in MSDB2UNL
3758 *-* arg dsn
+++ Interactive trace. TRACE OFF to end debug, ENTER to continue. +++
trace off
Line 3760 setting sw_trace to 1
DATA SET S6843F.MSDB2.UNLOAD NOT FREED, DATA SET IS OPEN
Line 3761 FREE DA 'S6843F.MSDB2.UNLOAD' RC = 12
Line 3760 LMINIT on dataset 'S6843F.MSDB2.UNLOAD' RC = 0
Line 3764 LMOPEN on dataid ISR00053 RC = 0
Line 3774 LMMLIST on dataid ISR00053 RC = 12 zerrlm=Member name must be 1 to 8
characters long.
Line 3783 LMCLOSE on dataid ISR00053 RC = 0
Line 3786 LMFREE on dataid ISR00053 RC = 0
The manual says that rc 12 from LMMLIST is one of the following:-
Quote:
One of these:
The data set is not open or is not partitioned. (well, it's certainly partitioned)
A parameter value is invalid. (which would that be?)
Member list was created using LMMDISP. (I don't use LMMDISP anywhere in any Rexx script)
I have a variation on the SQL/Rexx code that checks the validity of the actual SQL. If I run this instead (which does NOT create any output files) then the LMMLIST works fine.
The weird (?) thing is the following.
- use the action bar (everything works fine)
- run the SQL/Rexx code and create an output file
- use the action bar which gives rc = 12 and an empty panel list
- use the action bar AGAIN, and the correct results are fetched and shown _________________ Michael
Joined: 02 Dec 2002 Posts: 624 Topics: 175 Location: Stockholm, Sweden
Posted: Wed Jan 04, 2023 2:34 am Post subject:
Thanks for your suggestion. The error turned out to be the following. I had some code that did the following
Code:
rc = check_valid_member(filename)
if rc <> 'OK' then
do
replace.0 = 0
return 1
end
where check_valid_member contained originally
Code:
check_valid_member:
arg member <---------------- Note this error
xx = msg('OFF')
rc = sysdsn("'"filename"'")
xx = msg(xx)
return rc
This error was then screwing up the contents of MEMBER elsewhere.
Once I changed MEMBER to FILENAME, the code worked as expected. _________________ Michael
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum