I'm trying to help a friend troubleshoot connection problems with an AS/400. He'd like to run a query against the AS/400 that will always return a record, (similar to a SELECT 1 against MSSQL).
He's attempted running SELECT 1 but without luck ... I'm assuming that the AS/400 expects a FROM TableName ...
Can anyone provided assistance? Is there a system table/file that always exists that he can run a SELECT TOP 1 (or it's equivalent) against? I've never interacted with an AS/400 so I'm a bit out of my element ... was hoping SO could give me a quick answer ...
Thanks in advance!
I'm pretty certain it's DB2 running on those boxes (they're called iSeries now, by the way) so you can give:
select * from sysibm.sysdummy1
a shot. This should return a single column IBMREQD
, set to Y
.
table QSQPTABL can also be used for this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With