On Thursday, 10/21/2010 at 02:23 EDT, Rick Barlow <[email protected]> wrote: > 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?
Those 0x11s are Set Buffer Address (SBA) orders, each followed by a two-byte offset into the 3270 buffer. (Row 1, column 1 is offset 0.) But what isn't obvious is that the offset has been munged in such a way that the hex values of each byte are displayable characters. Each offset contains a 12-bit address (buffer location) split across 2 bytes with 6 bits each. The munging was required by original SNA devices. >From the above, masking off the high-order 2 bits of each byte of C2F7 leaves you with xx00 0010 xx11 0111. Smushing those together you end up with 01011 0111, or 0xB7, decimal 183. On an 80-column screen that would be row 3 column 24 (row 3 starts at offset 160). I haven't tried it, and you should be able to use the simpler 14-bit address of the form 00xxxxxx xxxxxxxx, where those 14 bits are the binary offset. Formula is Offset = W * (R-1) + (C-1), where W = width of screen (default of 24), R= row number, C = column number. If you happen to have an old 3274/3174 Reference Summary, you'll find it has a table in the back that let's you easily look up "Row 3 column 24 is C2 F7 or 0x00B7. Use 0x13 to position the cursor "here". Alan Altmark z/VM and Linux on System z Consultant IBM System Lab Services and Training ibm.com/systems/services/labservices office: 607.429.3323 [email protected] IBM Endicott
