|
Justin:
I have no idea _where_ the info is, but I'll paste a sample of retrieving and
displaying server name, domain name and text description. The info is retrieved
by using the List Server Information (QZLSLSTI) API and the sample should work
back to V4R4 (not sure if it's also good at V4R3).
Tom Liotta
midrange-l-request@xxxxxxxxxxxx wrote:
> 10. Re: NetServer Config File (Justin Haase)
>
>Where is the file which holds the settings for NetServer? For example, the
>parms you see in iSeries Navigator, where does the system store the name of
>the system it reports as, the domain, the description, etc.
>
>This is in regard to V5R1.
---- begin
pgm
dcl &NSName *char 15 /* NetServer ServerName */
dcl &DomName *char 15 /* NetServer DomainName */
dcl &TextDesc *char 50 /* NetServer TextDescription */
dcl &a_pos *char 4 /* Data Start Pos.-Binary */
dcl &InfoQual *char 15 value( '*ALL ' )
/* Create a *usrspc to work with... */
call QUSCRTUS ( +
'NETS QTEMP ' +
'TMPLST ' +
x'00001000' +
X'00' +
'*ALL ' +
'Temporary IFS space ' +
'*YES ' +
x'0000000000000000' +
)
/* List NetServer status info into our *usrspc... */
call QZLSLSTI ( +
'NETS QTEMP ' +
'ZLSL0201' +
&InfoQual +
x'0000000000000000' +
)
/* Get the starting position of the list from the header... */
call QUSRTVUS ( +
'NETS QTEMP ' +
x'0000007D' +
x'00000004' +
&a_pos +
)
/* NetServer ServerName is at offset 68 into the list... */
chgvar %bin( &a_pos ) ( %bin( &a_pos ) + 68 + 1 )
/* Get the NetServer ServerName from the *usrspc... */
call QUSRTVUS ( +
'NETS QTEMP ' +
&a_pos +
/* len(15) */ x'0000000F' +
&NSName +
)
/* NetServer DomainName is at offset 98 into the list... */
chgvar %bin( &a_pos ) ( %bin( &a_pos ) + 30 )
/* Get the NetServer DomainName from the *usrspc... */
call QUSRTVUS ( +
'NETS QTEMP ' +
&a_pos +
/* len(15) */ x'0000000F' +
&DomName +
)
/* NetServer TextDesc is at offset 128 into the list... */
chgvar %bin( &a_pos ) ( %bin( &a_pos ) + 30 )
/* Get the NetServer TextDesc from the *usrspc... */
call QUSRTVUS ( +
'NETS QTEMP ' +
&a_pos +
/* len(50) */ x'00000032' +
&TextDesc +
)
/* Display NetServer properties... */
sndusrmsg ( 'NetServer ServerName:' *bcat &NSName) tomsgq( *EXT )
sndusrmsg ( 'NetServer DomainName:' *bcat &DomName) tomsgq( *EXT )
sndusrmsg ( 'NetServer TextDesc:' *bcat &TextDesc) tomsgq( *EXT )
return
endpgm
---- end
--
--
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone 253-872-7788 x313
Fax 253-872-7904
http://www.powertechgroup.com
__________________________________________________________________
Try AOL and get 1045 hours FREE for 45 days!
http://free.aol.com/tryaolfree/index.adp?375380
Get AOL Instant Messenger 5.1 for FREE! Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
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.