|
Walden, I love a challenge... Hm, lets check out Leif's site....yep that'd be helpful. Might have to go on my x-mas list. But doesn't do me much good today. On to google.....Dang, a one byte change is all it takes???? Don't know if I want to go this route or not yet. Seems like a bad thing to do, but obviously you've done it. How common is hacking a program to system state to allow for calling system domain programs? Thanks, Charles > -----Original Message----- > From: Walden H. Leverich [mailto:WaldenL@xxxxxxxxxxxxxxx] > Sent: Friday, June 18, 2004 3:15 PM > To: Midrange Systems Technical Discussion > Subject: RE: Looking for a DLTOBJ command.. > > > >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.) > > > -- > This is the Midrange Systems Technical Discussion > (MIDRANGE-L) mailing list > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > or email: MIDRANGE-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.