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



Jeff,

There are still sometimes when I break out for a CL command.  When I do so 
I use one of three methods:
- the system() api
- the QCMDEXC api
- the QCAPCMD api
They all have their pro's and con's.
What I don't do is break out for a command when it's part of the language. 
 Granted some of these keywords have either come out on later releases, or 
have been enhanced on later releases.

Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 




Jeff Bull <Jeff.Bull@xxxxxxxxxxxxxxx> 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
10/10/2003 10:09 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
cc

Subject
RE: authority question....






Hi Rob,

I recall that I built a CL command in a string-variable, then used the 
CALL
opcode to invoke QCMDEXC - the parms being the string and string-length. 
Is
this not a good way to exec the odd o/s command?  Is this not considered 
as
allowing rpg to 'handle itself' ?

As I said, I'm no rpg programmer ... so I'm willing to be educated ;-)

Kind regards,

Jeffrey E. Bull
OS400 Software Support Consultant

IBM Certifiied iSeries System Implementation Expert
IBM Certified AS/400 System Administrator 

tel.      +44 [0] 149 454 9533               swb.   +44 [0] 149 454 9400
mbl.     +44 [0] 786 750 4961               fax.    +44 [0] 149 454 9454
web.     http://www.itm-group.co.uk
 
ITM Group Ltd, Latimer Square, White Lion Road, Amersham, Buckinghamshire,
HP7 9JQ, United Kingdom


-----Original Message-----
From: rob@xxxxxxxxx [mailto:rob@xxxxxxxxx]
Sent: 10 October 2003 15:37
To: Midrange Systems Technical Discussion
Subject: RE: authority question....


Jeff,

Not CL phobics.

However, why not let RPG handle itself?  When you do it that way you don't 

have to worry about what level of scoping to apply on using QCMDEXC's 
OVRDBF and other functions.  And I think it will be a touch more readable.

Remember I said "who 'NEEDS'".  Granted the other ways may work, (then 
again they may not if you take an OPM and use CVTRPGSRC), but this way 
seems, to me anyway, to be a little more straightforward.

Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 




Jeff Bull <Jeff.Bull@xxxxxxxxxxxxxxx> 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
10/10/2003 08:26 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
cc

Subject
RE: authority question....






Hi all,
                 I just thought I'd butt in on this one.  Do we have some 
CL-phobiacs
among our ranks :-)

Now I'm no RPG specialist (thank G), however, in a dark recess of my mind,
from many years ago ...

I recall that there is an Opcode that allows CL command strings to be
executed directly from within RPG.
IIRC - this is precisely what I used it for - file overrides.
Is this feature no longer available ?

I can understand why you might not want the hassle of a CL-wrapper for 
your
RPG.


Kind regards,

Jeffrey E. Bull
OS400 Software Support Consultant

IBM Certifiied iSeries System Implementation Expert
IBM Certified AS/400 System Administrator 

tel.      +44 [0] 149 454 9533               swb.   +44 [0] 149 454 9400
mbl.     +44 [0] 786 750 4961               fax.    +44 [0] 149 454 9454
web.     http://www.itm-group.co.uk
 
ITM Group Ltd, Latimer Square, White Lion Road, Amersham, Buckinghamshire,
HP7 9JQ, United Kingdom


-----Original Message-----
From: rob@xxxxxxxxx [mailto:rob@xxxxxxxxx]
Sent: 10 October 2003 14:18
To: Midrange Systems Technical Discussion
Subject: Re: authority question....


WRKOBJ seems to only show you the one you have access to.

We had a person who had two copies of the file in their library list. They 


called a program to use it and it bombed.  They did a WRKOBJ and used 
option 5 and it looked ok.  I went over to their session and instead of 
using WRKOBJ I used DSPOBJD *libl/object and it bombed.  That's how we 
found out they had two in their library list.

Instead of implicitly opening the program in your program (if you are 
using RPG) open it explicitly.  Then check the status code on the open. If 


it fails because you do not have authority, then call an api to list this 
object in your library list.  Process that user space to find the desired 
object.  Then change the variable used in the EXTFILE keyword to point to 
this new file.  Who needs CL and overrides for this?

Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 
_______________________________________________
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.


________________________________________________________________________
This e-mail has been scanned for all viruses by ITM. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, 
email marketing@xxxxxxxxxxxxxxx
ITM - Managing Communication and Information through technology
Company registration number - 3783433
________________________________________________________________________


DISCLAIMER

Any opinions expressed in this email are those of the
individual and not necessarily the Company. This email
and any files transmitted with it, including replies and
forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are 
confidential and solely for the use of the intended recipient. If you are 
not the intended recipient or the 
person responsible for delivering to the intended recipient, 
be advised that you have received this email in error and
 that any use is strictly prohibited.

If you have received this email in error please notify the IT
manager by telephone on +44 (0)870 871 2233 or via 
email to Administrator@xxxxxxxxxxxxxxx, including a copy
of this message. Please then delete this email and 
destroy any copies of it.

________________________________________________________________________This

e-mail has been scanned for all viruses by ITM. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, 
email marketing@xxxxxxxxxxxxxxx
ITM - Managing Communication and Information through technology
Company registration number - 
3783433_____________________________________________________________________
___
_______________________________________________
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.


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


________________________________________________________________________
This e-mail has been scanned for all viruses by ITM. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, 
email marketing@xxxxxxxxxxxxxxx
ITM - Managing Communication and Information through technology
Company registration number - 3783433
________________________________________________________________________


DISCLAIMER

Any opinions expressed in this email are those of the
individual and not necessarily the Company. This email
and any files transmitted with it, including replies and
forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are 
confidential and solely for the use of the intended recipient. If you are 
not the intended recipient or the 
person responsible for delivering to the intended recipient, 
be advised that you have received this email in error and
 that any use is strictly prohibited.

If you have received this email in error please notify the IT
manager by telephone on +44 (0)870 871 2233 or via 
email to Administrator@xxxxxxxxxxxxxxx, including a copy
of this message. Please then delete this email and 
destroy any copies of it.

________________________________________________________________________This 
e-mail has been scanned for all viruses by ITM. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, 
email marketing@xxxxxxxxxxxxxxx
ITM - Managing Communication and Information through technology
Company registration number - 
3783433________________________________________________________________________
_______________________________________________
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 thread ...

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.