Not all procedures show up as CLE programs. For example, if I query
SYSPROCS I have a procedure call TEST in ROB that looks like this:
BEGIN DECLARE COUNTER INT DEFAULT 0 ; CREATE TABLE ROB . BISMUTH ( MYKEY
INT , THENBR DEC ( 15 , 5 ) ) ; WHILE COUNTER < 10000 DO INSERT INTO ROB .
BISMUTH ( THENBR ) VALUES ( RAND ( 1 ) * 100 ) ; SET COUNTER = COUNTER + 1
; END WHILE ; CREATE TABLE ROB . BISMUTH1 AS ( SELECT MYKEY , THENBR FROM
ROB . BISMUTH ORDER BY MYKEY ) WITH DATA ; CREATE TABLE ROB . BISMUTH2 AS
( SELECT MYKEY , THENBR FROM ROB . BISMUTH ORDER BY THENBR ) WITH DATA ;
CREATE INDEX ROB . BISMUTHA ON ROB . BISMUTH ( MYKEY ASC , THENBR ASC ) ;
CREATE INDEX ROB . BISMUTHB ON ROB . BISMUTH ( THENBR ASC , MYKEY ASC ) ;
CREATE TABLE ROB . BISMUTH3 AS ( SELECT MYKEY , THENBR FROM ROB . BISMUTH
ORDER BY MYKEY ) WITH DATA ; CREATE TABLE ROB . BISMUTH4 AS ( SELECT MYKEY
, THENBR FROM ROB . BISMUTH ORDER BY THENBR ) WITH DATA ; END

If I do a WRKOBJ ROB/TEST I only see one old CL program (not CLE or CLLE
but CLP). I deleted it. I also did a WRKOBJ ROB/BISMUTH* and deleted all
those.
SAVOBJ OBJ(TEST) LIB(ROB) DEV(*SAVF) SAVF(ROB/ROB)
No objects saved or restored for library ROB.
STRSQL
CALL ROB.TEST
CALL statement complete.
DSPJOBLOG
Ownership of object BISMUTH in ROB type *FILE changed.
Ownership of object BISMUTH in ROB type *FILE changed.
Ownership of object BISMUTH1 in ROB type *FILE changed.
Ownership of object BISMUTH1 in ROB type *FILE changed.
Ownership of object BISMUTH2 in ROB type *FILE changed.
Ownership of object BISMUTH2 in ROB type *FILE changed.
Ownership of object BISMUTHA in ROB type *FILE changed.
Ownership of object BISMUTHA in ROB type *FILE changed.
Ownership of object BISMUTHB in ROB type *FILE changed.
Ownership of object BISMUTHB in ROB type *FILE changed.
Ownership of object BISMUTH3 in ROB type *FILE changed.
Ownership of object BISMUTH3 in ROB type *FILE changed.
Ownership of object BISMUTH4 in ROB type *FILE changed.
Ownership of object BISMUTH4 in ROB type *FILE changed.
WRKOBJ ROB/TEST
(Cannot find object to match specified name.)
WRKOBJ ROB/BISMUTH*
Object Type Library Attribute
BISMUTH *FILE ROB PF
BISMUTHA *FILE ROB LF
BISMUTHB *FILE ROB LF
BISMUTH1 *FILE ROB PF
BISMUTH2 *FILE ROB PF
BISMUTH3 *FILE ROB PF
BISMUTH4 *FILE ROB PF

So, how would CPY, SAV or RST or SAVLIB or RSTLIB or SAVOBJ or RSTOBJ work
on that?
It's pretty obvious that SAVOBJ didn't save squat.
WRKLNK '/QSYS.LIB/ROB.LIB/TEST.*'
Directory . . . . : /QSYS.LIB/ROB.LIB
(Cannot find object to match specified name.)
So I fail to see how CPY or SAV or RST would work on that procedure.
But, let's try this:
CRTSAVF QTEMP/ROBLIB
SAVLIB LIB(ROB) DEV(*SAVF) SAVF(QTEMP/ROBLIB)
869 objects saved from library ROB.
RSTLIB SAVLIB(ROB) DEV(*SAVF) SAVF(QTEMP/ROBLIB) RSTLIB(ROBA)
861 objects restored. 8 not restored to ROBA.
Cannot restore journal JRNTEST to library ROBA.
Cannot restore journal QSQJRN to library ROBA.
SQLPKG DBL not restored to ROBA.
Cannot restore receiver JRNTES2171 into library ROBA.
Cannot restore receiver QSQJRN0025 into library ROBA.
Cannot restore receiver QSQJRN1052 into library ROBA.
Cannot restore receiver QSQJRN1053 into library ROBA.
Cannot restore receiver QSQJRN1054 into library ROBA.
SELECT * FROM QSYS2.sysprocs
WHERE SPECIFIC_SCHEMA='ROBA'
Finds the stored procedure in the new library. So evidently the SAVLIB
and RSTLIB will get this, somehow. Since the object doesn't exist in ROB,
how did it do this? Is there something in the metadata stored in
DSPSAVF QTEMP/ROBLIB
Object Type Attribute Owner Size (K) Data
ROB *LIB PROD PROGRAMMER 752 YES
...
Because there were no TEST objects. There were a couple of TEST members.
In files like Q...SRC and EVENTF.


Rob Berendt

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2019 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].