D LenRtnVals      s             10i 0 Inz(%SIZE(RtnValsDS))
    D NbrVals         s             10i 0 Inz(1)
    D NamValue        s             10a   Inz('SYSNAME')
     *
    D RtnValsDS       ds
    D  RtnNbrVals                   10i 0
    D  RtnOffVals                   10i 0
    D  RtnAtrNam                    10a
    D  RtnDtaTyp                     1a
    D  RtnInfSts                     1a
    D  RtnAtrLen                    10i 0
    D  RtnSystem                     8a
     *
    D ErrRtn          ds
    D  ErrBytPrv                    10i 0 Inz(%SIZE(ErrRtn))
    D  ErrBytAvl                    10i 0 Inz(0)
    D  ErrMsgId                      7a
    D  ErrResved                     1a
    D  ErrMsgDta                   256a
     *
     * Work fields
    D SysName         s              8a
     *
    C                   CALL      'QWCRNETA'
    C                   Parm                    RtnValsDS
    C                   Parm                    LenRtnVals
    C                   Parm                    NbrVals
    C                   Parm                    NamValue
    C                   Parm                    ErrRtn
     *
    C                   Eval      SysName = RtnSystem
    C                   Eval      *InLr =  *On
    C                   Return


HTH

Guy

------------------------------


date: Tue, 14 Jun 2005 14:09:59 -0700
from: Dave Murvin <davem@xxxxxxxx>
subject: Easy way to get System name from ILE RPG?

Hi,

I'm looking for an easy way to get the system name for a report.  Was
hoping for something like SYSNAME for display files, but don't see anything
like this for printer files.  Didn't see it in the feedback areas
either.  I'm drawing a blank, but will be looking for APIs.

Anything out there easier than APIs?

Thanks

Dave Murvin
DRM Enterprises, Inc.




------------------------------

    D LenRtnVals      s             10i 0 Inz(%SIZE(RtnValsDS))
    D NbrVals         s             10i 0 Inz(1)
    D NamValue        s             10a   Inz('SYSNAME')
     *
    D RtnValsDS       ds
    D  RtnNbrVals                   10i 0
    D  RtnOffVals                   10i 0
    D  RtnAtrNam                    10a
    D  RtnDtaTyp                     1a
    D  RtnInfSts                     1a
    D  RtnAtrLen                    10i 0
    D  RtnSystem                     8a
     *
    D ErrRtn          ds
    D  ErrBytPrv                    10i 0 Inz(%SIZE(ErrRtn))
    D  ErrBytAvl                    10i 0 Inz(0)
    D  ErrMsgId                      7a
    D  ErrResved                     1a
    D  ErrMsgDta                   256a
     *
     * Work fields
    D SysName         s              8a
     *
    C                   CALL      'QWCRNETA'
    C                   Parm                    RtnValsDS
    C                   Parm                    LenRtnVals
    C                   Parm                    NbrVals
    C                   Parm                    NamValue
    C                   Parm                    ErrRtn
     *
    C                   Eval      SysName = RtnSystem
    C                   Eval      *InLr =  *On
    C                   Return



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.