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



>Anyone have or know of a DLTOBJ command I could use rather than rolling
my own?
>Alternately, does anyone know of an API that will help with this task?

Um, what are you willing to do to make this work? <G> I have just such a
command (code below), however, you have to bump the CPP for the command
to system state for it to work. 

Ever look at the DLTxxx commands? They all call the same CPP (QLIDLOBJ).
So IBM has basically written this for you, however you can't call it
since it's system state and system domain.

If you're willing to hack the program state[1] then the following code
will do exactly what you want:

----------Command-----------
             CMD        PROMPT('Delete Object')                  
             PARM       KWD(OBJ) TYPE(Q1) MIN(1) PROMPT('Object')
             PARM       KWD(TYPE) TYPE(*CHAR) LEN(10) MIN(1) +   
                          CHOICE('NOT Check for validity') +     
                          PROMPT('Object Type')                  
 Q1:         QUAL       TYPE(*NAME) MIN(1)                       
             QUAL       TYPE(*NAME) DFT(*LIBL) SPCVAL((*LIBL)) + 
                          PROMPT('Library')                      
--------End Command---------

------------CPP-------------
PGM (&P1OBJ &P1TYPE)                                               
                                                                   
DCL &P1OBJ *CHAR 20                                                
DCL &P1TYPE *CHAR 10 /* Type with '*' at front                     
DCL &W1TYPE *CHAR 10 /* API doesn't take '*' so strip it           
                                                                   
CHGVAR &W1TYPE %SST(&P1TYPE 2 9)                                   
                                                                   
/* Following call will fail if this program isn't hacked to system 
/*  state.                                                         
CALL QLIDLOBJ  (&P1OBJ &W1TYPE)                                    
                                                                   
ENDPGM                                                             
---------End CPP------------

-Walden

[1] - If you don't know how to do this, I'm not telling. You need to do
some research first. Might I suggest Leif's eBook @
http://www.iseries400.org

------------
Walden H Leverich III
President & CEO
Tech Software
(516) 627-3800 x11
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
 


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.