×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
The following RPGLE program gets and formats a message like:
"Type 9406 Model 720 Prc Grp P10 fc 206A Serial 10-2844M 1024mb Rel V5R1M0."


It's done from resources on these lists and may help you along.


     H BndDir('QC2LE') DftActGrp(*NO) ActGrp(*CALLER)
     H Debug Option(*srcstmt : *nodebugio)

     D sndMsg          PR
     D  msgText                      80    Const

     D matmatr         PR                  ExtProc('matmatr')
     D   attributes                    *   Value
     D   attrLen                      5i 0 Value

     D machineAttributes...
     D                 DS                  inz
     D   MMTR_Template_Size...
     D                               10i 0
     D   MMTR_Bytes_Used...
     D                               10i 0
     D   MMTR_VPD                  4096

     D VPDOffsets      DS                  inz
     D  vRes1                         8
     D  vMemOff                      10i 0
     D  vPrcOff                      10i 0
     D  vColOff                      10i 0
     D  vCecOff                      10i 0
     D  vPnlOff                      10i 0
     D  vRes2                        12
     D  vMemInstalled                 5i 0
     D  vMemRequired                  5i 0

     D cecVPD          DS                  inz
     D  cCEC_read                     4
     D  cManufacturin                 4
     D  creserved1                    4
     D  cType                         4
     D  cModel                        4
     D  cPseudo_Model                 4
     D  cGroup_Id                     4
     D  creserved2                    4
     D  cSys_Type_Ext                 1
     D  cFeature_Code                 4
     D  cSerial_No                   10
     D  creserved3                    1

     D panelVPD        DS                  inz
     D  preserved1                    2
     D  pPanel_Type                   4
     D  pModel                        3
     D  pPart                        12
     D  preserved2                    4
     D  pManufacturin                 4
     D  pROS_Part                    12
     D  pROS_Card                    10
     D  pROS_ID                       1
     D  pROS_Flag                     1
     D  pROS_Fix                      1
     D  pSerial_No                   10

     D $MMTR_SERIAL_   S              5I 0 inz(4)
     D $MMTR_VPD_      S              5i 0 inz(x'012c')

     D prErrStruc      DS                  inz
     D  prErrSSize                   10i 0 inz(%len(prErrStruc))
     D  PrErrSUse                    10i 0
     D  prErrSmsgID                   7
     D  prErrSResrv                   1
     D  prErrSData                   80

     D prRcvr          s            128
     D prRcvrLen       s             10i 0 inz(%size(prRcvr))
     D prFormat        s              8    inz('PRDR0100')
     D prPrdInfo       s             27    inz('*OPSYS *CUR  0000*CODE    ')
     D prErr           s                   Like(prErrStruc)
     D prRelease       s              6

     C                   Eval      MMTR_Template_Size =
%size(machineAttributes)

     C                   CallP     matmatr( %ADDR(machineAttributes) :
     C                                      $MMTR_VPD_ )

     C                   Eval      VPDOffsets = %subst(MMTR_VPD:
     C                                                 1:
     C                                                 %len(VPDOffsets))

     C                   Eval      cecVPD   = %subst(MMTR_VPD:
     C                                               vCecOff-7:
     C                                               %len(cecVPD))

     C                   Eval      panelVPD = %subst(MMTR_VPD:
     C                                               vPnlOff-7:
     C                                               %len(panelVPD))

     C                   Eval      prErr = prErrStruc

     C                   Call      'QSZRTVPR'
     C                   Parm                    prRcvr
     C                   Parm                    prRcvrLen
     C                   Parm                    prFormat
     C                   Parm                    prPrdInfo
     C                   Parm                    prErr

     C                   Eval      prErrStruc = prErr

     C                   Eval      prRelease  = %subst(prRcvr: 20: 6)

     C                   CallP     sndMsg('Type '     + %trim(cType) +
     C                                    ' Model '   + %trim(cModel) +
     C                                    ' Prc Grp ' + %trim(cGroup_ID) +
     C                                    ' fc '      + %trim(cFeature_Code)
+
     C                                    ' Serial '  + %trim(cSerial_No) +
     C                                  ' ' +
%trim(%editc(vMemInstalled:'Z')) +
     C                                    'mb Rel ' + %trim(prRelease) )

     C                   Eval      *inLR = *On

     C                   Return

     PsndMsg           B
     DsndMsg           PI
     D inpText                       80    Const

      * Send message API parameters
     D msgID           s              7    inz('CPF9898')
     D msgFil          s             20    inz('QCPFMSG   *LIBL     ')
     D msgData         s                   Like(inpText)
     D msgDataLen      s             10i 0 inz(%size(msgData))
     D msgType         s             10    inz('*INFO')
     D msgStackEnt     s             10    inz('*')
     D msgStackCnt     s             10i 0 inz(3)
     D msgKey          s              4
     D msgErrStruc     s                   Like(ErrStruc)

      * API error structure
     D errStruc        DS                  inz
     D  errSSize                     10i 0 inz(%len(errStruc))
     D  errSUse                      10i 0
     D  errSmsgID                     7
     D  errSResrv                     1
     D  errSData                     80

     C                   Eval      msgData = inpText

     C                   Eval      msgErrStruc = errStruc

     C                   Call      'QMHSNDPM'
     C                   Parm                    msgID
     C                   Parm                    msgFil
     C                   Parm                    msgData
     C                   Parm                    msgDataLen
     C                   Parm                    msgType
     C                   Parm                    msgStackEnt
     C                   Parm                    msgStackCnt
     C                   Parm                    msgKey
     C                   Parm                    msgErrStruc

     C                   Eval      errStruc = msgErrStruc

     PsndMsg           E


-----Original Message-----
From: Carley, Neil [mailto:neil.carley@misys.com]
Sent: Monday, April 15, 2002 8:18 AM
To: 'MIDRANGE-L@midrange.com'
Subject: API for processor feature


Hi group,

I have been asked if there is a way to retrieve the system processor feature
and interactive feature in a program, such as the info you get from
displaying the processor info in SST. I don't think the system value
qprcfeat will do as it doesn't show the exact feature code.  Would there be
an API or something for this, I tried searching the web etc. but can't find
what I'm after.

TIA
Neil


_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
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 ...


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

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