× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

Only about 6 weeks MI experience here, so apologies in advance for any
dumb/blindingly obvious questions.

I recently successfully coded a simple MI program to use the MATMATR
instruction and the X'012C'  Vital Product Data option.
I noticed in the materialized structure that offset information is given
about where memory VPD and CEC VPD is returned.

For no reason other than to try and stretch myself I attempted to future
proof my program by using this offset info to point to some new spaces. I
stretched too far! I can't get this to work at all and I don't really
understand why as I have used the same technique elsewhere without a
problem.

DCL DD VPDMEM CHAR(2);
DCL SPCPTR .VPDMEM INIT(VPDMEM);
DCL SPC MEM BAS(.VPDMEM);
   DCL DD TOTMEM           BIN(2)     DIR;

DCL DD VPDCEC CHAR(48);
DCL SPCPTR .VPDCEC INIT(VPDCEC);
DCL SPC CEC BAS(.VPDCEC);
  DCL DD STSCECLSTREAD    CHAR(4)    DIR;   /* Start of CEC */
  DCL DD SYSMANID         CHAR(4)    DIR;
  DCL DD *                CHAR(4)    DIR;
  DCL DD SYSTYPE          CHAR(4)    DIR;
   DCL DD MODELNBR         CHAR(4)   DIR;
   DCL DD PSDMODNBR        CHAR(4)   DIR;
   DCL DD PRCGRP           CHAR(4)   DIR;
   DCL DD *                CHAR(4)   DIR;
   DCL DD SYSTYPEXT        CHAR(1)   DIR;
   DCL DD SYSPRCFEAT       CHAR(4)   DIR;
   DCL DD SYSSRLNBR        CHAR(4)   DIR;
   DCL DD *                CHAR(1)   DIR;  /* End of CEC */

DCL DD MATMATR_RQS CHAR(2);

DCL DD MATERIALIZE-AREA CHAR(2608) BDRY(16);
DCL SPCPTR .MACHINE-ATTR  INIT(MATERIALIZE-AREA);
DCL SPC     MACHINE-ATTR  BAS(.MACHINE-ATTR);
DCL DD  BYTES-PROVIDED  BIN(4) DIR;
DCL DD  BYTES-AVAILABLE BIN(4) DIR;
DCL DD  VPD              CHAR(28) DEF(MACHINE-ATTR) POS(9);
DCL DD *                CHAR(8)   DIR;
DCL DD OFFMEMVPD       BIN(4)     DIR;
DCL DD OFFPRCVPD       BIN(4)     DIR;
DCL DD OFFCOLCOL         BIN(4)     DIR;
DCL DD OFFCECVPD        BIN(4)     DIR;
DCL DD OFFPNLVPD        BIN(4)     DIR;
DCL DD *                          CHAR(2572) DIR;

CPYBLA  MATMATR_RQS, X'012C';
CPYNV   BYTES-PROVIDED, 2608;

MATMATR  .MACHINE-ATTR, MATMATR_RQS;

CPYBLA  IOFFMEMVPD, OFFMEMVPD;
CPYBLA  IOFFCECVPD, OFFCECVPD;

SETSPPO  .MACHINE-ATTR, OFFMEMVPD;
CPYBWP   .VPDMEM, .MACHINE-ATTR;

SETSPPO  .MACHINE-ATTR, 1;
SETSPPO  .MACHINE-ATTR, OFFCECVPD;
CPYBWP   .VPDCEC, .MACHINE-ATTR;

The offset info is returned correctly in the MACHINE-ATTR space but as soon
as I move the Space Pointer and copy it I get garbage back in the MEM and
CEC spaces.

Can anyone enlighten me as to the proper way to do something like this?

thanks
Ken

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

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