|
Use RSLVDP (Resolve Data Pointer) when you don't know a variable name until runtime. The target variable must have attributes STAT EXT. The RSLVDP third operand is a progam pointer denoting which activation to search in the current activation group. A null third operand means search all activations in the current activation group in reverse order. The second operand is the variable name. The first operand receives a data pointer. A recursion level qualifier isn't needed here because EXT variables are static and thus shared by recursion. The RSLVDP instruction and the target EXT variable may be in different programs! This lays the foundation for an IMPORT/EXPORT feature in an OPM compiler. Here's an example. dcl dd January stat char(11) ext; dcl dd February stat pkd(5,2) ext; dcl dtaptr Chameleon auto; dcl dd VarName32 auto char(32); cpyblap VarName32, "JANUARY", " "; -- prepare variable name rslvdp Chameleon, VarName32, *; -- point to January cpybla Chameleon, "hello there"; -- modify January (character) cpyblap VarName32, "FEBRUARY", " "; -- prepare variable name rslvdp Chameleon, VarName32, *; -- point to February cpynv Chameleon, P"123.45"; -- modify February (packed) +--- | This is the MI Programmers Mailing List! | To submit a new message, send your mail to MI400@midrange.com. | To subscribe to this list send email to MI400-SUB@midrange.com. | To unsubscribe from this list send email to MI400-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: dr2@cssas400.com +---
As an Amazon Associate we earn from qualifying purchases.
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.