'quits working' = the program executes and produces the desired output
but the system name field contains spaces
I'm attempting to get the name of the AS/400. I have some specific
logic to execute on certain AS/400's.
I realize there are other methods of retreaving the system name, but
since this is an RPGSQL program, this seemed the easyest.
Ron
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Elvis Budimlic
Sent: Thursday, November 06, 2008 4:16 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: System Name - SQL current server
Please define 'quits working'.
Also, are you interested in a database name or the server name?
If database, would
SELECT CATALOG_NAME INTO :SysName FROM SYSCATALOGS WHERE CATALOG_TYPE
= 'LOCAL'
work instead?
If server name, RTVNETA CL command may work for your needs:
RTVNETA SYSNAME(&SYSTEMNAME)
Elvis
Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400 www.centerfieldtechnology.com
-----Original Message-----
Subject: System Name - SQL current server
I couldn't find it in the recent archives (July/Aug), but I remembered
seeing this trick to get the system name.
C/exec sql
C+ values current server
C+ into :SysName
C/end-exec
It works great on the system it is compiled on. But when I move the
program object to production, it quits working.
I've moved the object using the following methods, none work:
1) Implementer (David ??)
2) ASNET (SSA product)
3) Save program to a *SAVF and use SNDNETF.
Sending the source to the production box and compiling is the only way
I've gotten it to work.
Anyone know any tricks to get around this. Compiling on a production
box is not long term solution.
Thanks
Ron
--
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.
**********************
** LEGAL DISCLAIMER **
**********************
This E-mail message and any attachments may contain
legally privileged, confidential or proprietary
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of
this message to the intended recipient(s), you are
hereby notified that any dissemination, distribution
or copying of this E-mail message is strictly
prohibited. If you have received this message in
error, please immediately notify the sender and
delete this E-mail message from your computer.
As an Amazon Associate we earn from qualifying purchases.