Here is something I wrote long ago that may help. It supports both 80 and 132
column sba addresses.
/*-------------------------------------------------*/
/* RC2SBA EXEC - */
/* */
/* Convert 3270 screen ROW and COLUMN numbers */
/* into 12/14/16 bit buffer address. */
/* */
/* Format: RC2SBA row col size */
/* */
/* Where: row = 1 to 43 */
/* col = 1 to 132 */
/* size = 80 or 132 */
/* */
/* By: Mike Rydberg 7/92 */
/*-------------------------------------------------*/
parse arg row col size .
if size = 80 | size = 132 then nop
else size = 80
if row < 1 | row > 43 | col < 1 | col > 132 then do
say 'format: RC2SBA row col size '
exit
end
abs = (size * (row-1)) + (col-1)
addr1 = (abs % 64)
addr2 = (abs // 64)
addr1 = bitor(X2C(D2X(addr1)),'40'x)
addr2 = bitor(X2C(D2X(addr2)),'40'x)
/*-------------------------------------------------*/
/* We have to 'OR' the high order bit if the */
/* address bytes are within these ranges for */
/* 12-bit buffer address. */
/* */
/* x'41' to x'49' (Cx) */
/* x'51' to x'59' (Dx) */
/* x'62' to x'69' (Ex) */
/* x'70' to x'79' (Fx) */
/* */
/*-------------------------------------------------*/
if (addr1 > '40'x & addr1 < '4A'x) | ,
(addr1 > '50'x & addr1 < '5A'x) | ,
(addr1 > '61'x & addr1 < '6A'x) | ,
(addr1 > '6F'x & addr1 < '7A'x) then
addr1 = bitor(addr1,'80'x)
if (addr2 > '40'x & addr2 < '4A'x) | ,
(addr2 > '50'x & addr2 < '5A'x) | ,
(addr2 > '61'x & addr2 < '6A'x) | ,
(addr2 > '6F'x & addr2 < '7A'x) then
addr2 = bitor(addr2,'80'x)
sba = c2x(addr1)||c2x(addr2)
say 'Decimal=' abs ',14/16-BIT=' right(d2x(abs),4,'0')' ,12-BIT=' sba
exit
From: The IBM z/VM Operating System [mailto:[email protected]] On Behalf
Of Rick Barlow
Sent: Thursday, October 21, 2010 1:23 PM
To: [email protected]
Subject: VTAM USSMSG10 buffer location assistance
I am looking for someone who can point me to a reference that might help me to
modify a USSMSG10 screen that is coded using screen buffer locations. Before
anyone comments on still having VTAM on VM, let me say that the reason we are
doing this is to add a message to the screen to inform the users that VTAM is
going away - soon. I know that the declarations probably include a 3270 data
stream command and a location within the screen buffer. I am trying to locate
documentation that might help. I am including a brief code snippet.
DC X'11C14F1D60' Line 2 Col 1 Normal
DC C'@'
DC X'11C16F' Line 2 Col 32
DC C'DATA CENTER NORTH'
*
DC X'11C2F7' Line 3 Col 24
DC C'TEST AND DEVELOPMENT SYSTEM (CDC)'
Can anyone point me to documentation or a possible contact who might be able to
steer me in the right direction?
Thank you
Rick Barlow
Nationwide Insurance