SBA In RECEIVE Data

1 view
Skip to first unread message

Grinsell, Don

unread,
Oct 8, 1998, 3:00:00 AM10/8/98
to
The following two pamphlets will do the trick for you:
GX20-1878 3274 Control Unit Reference Summary
GA23-0057 3270 Buffer Address Codes
The same information may be obtained from other sources as well, I'm sure.

Donald Grinsell
State of Montana

> -----Original Message-----
>
> Further to this particular thread........
>
> Does any one know where I can find (or perhaps even better provide me
> with) a table which describes valid 3270 buffer addresses. I need to
> build a native 3270 map and have all the info I require
> except where to
> put things on the screen!
>
> Thanks,
>
> Greg Smith
> HDS Services Pty Ltd.
>

Kevin Mitchell

unread,
Oct 8, 1998, 3:00:00 AM10/8/98
to
I hope the following explanation and tables help.

- Kevin M

*
* 3270 BUFFER ADDRESSING
*
* REGARDLESS OF THE ACTUAL TERMINAL DIMENSIONS,
* THE 3270 BUFFER IS ADDRESSED AS A 64 X 64 ARRAY.
*
* NOTE: IF YOU HAVE A 4096 BYTE AREA, YOU CAN ADDRESS
* ANY LOCATION USING 12 BITS. IF YOU SPLIT YOUR
* 12 BIT ADDRESS INTO 2 EQUAL PARTS, YOU HAVE
* TWO 6-BIT NUMBERS. SIX BITS CAN HOLD A NUMBER
* IN THE RANGE 0-63. IN OTHER WORDS, IT IS KIND
* OF NATURAL TO THINK OF A 4K AREA AS A 64 X 64
* ARRAY.
*
* IN THEIR INFINITE WISDOM, THE FOLKS WHO DESIGNED
* THE 3270 DECIDED THAT IT WOULD BE TOO SIMPLE TO
* USE SOME CONTIGUOUS SET OF EBCDIC CODES TO
* REPRESENT THE ARRAY INDEXES. (I CAN UNDERSTAND WHY
* THEY DIDN'T JUST USE THE BINARY NUMBERS 0-63 -- THAT
* WOULD BE TOO EASY AND LOGICAL.)
*
* THE EBCDIC CODES THAT ARE USED TO REPRESENT THE ARRAY
* INDEXES (INDICES?) ARE IN THE TABLE BELOW.
*
* TO CONVERT A ROW/COLUMN TO A 3270 BUFFER ADDRESS
*
* YOU COMPUTE THE BUFFER LOCATION:
* BUFLOC = ( ( ROW - 1 ) * DISPLAY WIDTH ) + COLUMN - 1
*
* (THIS ASSUMES THAT ROW/COLUMN COORDINATES ARE
* RELATIVE TO 1 - THE UPPER LEFT CORNER IS ROW 1,
* COLUMN 1)
*
* THEN YOU COMPUTE THE 64 X 64 COORDINATES OF THE
* BUFFER LOCATION:
* NEWROW = BUFLOC/64 (INTEGER VALUE)
* NEWCOL = BUFLOC MODULO 64 (REMAINDER OF DIVISION)
*
* THEN YOU USE NEWROW AND NEWCOL AS INDEXES INTO
* THE TABLE TOBC TO DETERMINE THE CODES TO USE
* IN YOUR 3270 DATA STREAM.
*
* TO CONVERT FROM 3270 CODES TO ROW/COLUMN COORDINATES
* YOU USE THE REVERSE PROCEDURE. THE SECOND TABLE IS
* USED TO CONVERT 3270 CODES TO NUMBERS BETWEEN 0-63.
*
*
* TABLE TO CONVERT NUMBER BETWEEN 0 AND 63
* TO 3270 BUFFER ADDRESS CHARACTER
*
TOBC DC X'40C1C2C3C4C5C6C7C8C94A4B4C4D4E4F' 0-15
DC X'50D1D2D3D4D5D6D7D8D95A5B5C5D5E5F' 16-31
DC X'6061E2E3E4E5E6E7E8E96A6B6C6D6E6F' 32-47
DC X'F0F1F2F3F4F5F6F7F8F97A7B7C7D7E7F' 48-63
*
* TABLE TO CONVERT 3270 BUFFER ADDRESS CHARACTER
* TO NUMBER BETWEEN 0 AND 63. OTHER CHARACTERS
* ARE CONVERTED TO X'FF'.
*
FROMBC DC 256X'FF'
ORG MZVBC2##+X'40'
DC AL1(0) X'40
ORG MZVBC2##+X'C1'
DC AL1(1,2,3,4,5,6,7,8,9) X'C1-C9
ORG MZVBC2##+X'4A'
DC AL1(10,11,12,13,14,15,16) X'4A-50
ORG MZVBC2##+X'D1'
DC AL1(17,18,19,20,21,22,23,24,25) X'D1-D9
ORG MZVBC2##+X'5A'
DC AL1(26,27,28,29,30,31,32,33) X'5A-61
ORG MZVBC2##+X'E2'
DC AL1(34,35,36,37,38,39,40,41) X'E2-E9
ORG MZVBC2##+X'6A'
DC AL1(42,43,44,45,46,47) X'6A-6F
ORG MZVBC2##+X'F0'
DC AL1(48,49,50,51,52,53,54,55,56,57) X'F0-F9
ORG MZVBC2##+X'7A'
DC AL1(58,59,60,61,62,63) X'7A-7F
ORG ,
*

> -----Original Message-----
> From: CICS List [mailto:CIC...@UGA.CC.UGA.EDU]On Behalf Of Greg Smith
> Sent: Thursday, October 08, 1998 3:56 PM
> To: CIC...@UGA.CC.UGA.EDU
> Subject: Re: SBA In RECEIVE Data
>
>
> Hi all,


>
> Further to this particular thread........
>
> Does any one know where I can find (or perhaps even better provide me
> with) a table which describes valid 3270 buffer addresses. I need to
> build a native 3270 map and have all the info I require
> except where to
> put things on the screen!
>
> Thanks,
>
> Greg Smith
> HDS Services Pty Ltd.
>

> On Wednesday, September 16, 1998 1:55 AM, Christopher Frank
> [SMTP:FAd...@AOL.COM] wrote:
> > Karen,
> >
> > > At some terminals, when a program issues an EXEC CICS RECEIVE
> INTO()
> > >
> > > LENGTH() command at the start of a transaction, the received data
> > > on
> > > screen in preceded by the SBA field.
> > > Isn't the SBA supposed to be trimmed off by CICS?
> > >
> > No. However, if the first or only field on the screen
> begins in row1,
> > column1,
> > the 3270 itself may not send an SBA indicating that location
> > (X'114040'). But
> > it is not CICS that is stripping it off.
> >
> > You can test this by typing your transid on a clear screen beginning
> > in row1,
> > column1; you should not see a leading SBA. Enter it again from a
> clear
> > screen,
> > but beginning in a different location (like row2, column1) and you
> > will see
> > the leading SBA.
> >
> > Regards,
> >
> > Christopher Frank
> > STAR, Inc.
>

Kevin Mitchell

unread,
Oct 8, 1998, 3:00:00 AM10/8/98
to
OOPS!! I messed up the ORG labels in the second table.
Here is the corrected version.

- Kevin M

ORG FROMBC+X'40'
DC AL1(0) X'40
ORG FROMBC+X'C1'
DC AL1(1,2,3,4,5,6,7,8,9) X'C1-C9
ORG FROMBC+X'4A'
DC AL1(10,11,12,13,14,15,16) X'4A-50
ORG FROMBC+X'D1'
DC AL1(17,18,19,20,21,22,23,24,25) X'D1-D9
ORG FROMBC+X'5A'
DC AL1(26,27,28,29,30,31,32,33) X'5A-61
ORG FROMBC+X'E2'
DC AL1(34,35,36,37,38,39,40,41) X'E2-E9
ORG FROMBC+X'6A'
DC AL1(42,43,44,45,46,47) X'6A-6F
ORG FROMBC+X'F0'
DC AL1(48,49,50,51,52,53,54,55,56,57) X'F0-F9
ORG FROMBC+X'7A'

Thigpen, Tony

unread,
Oct 8, 1998, 3:00:00 AM10/8/98
to
I have used sba's and I have never seen a good explanation, just tables.
Now it makes more sence. Thanks.
As for why they don't use x'00' to x'64, it's because any character less
than x'40' is a command. There is not always an intuitive length of
parameters for each command, so they just look for parameters until they
find a character less than x'40'. Of course, they had to complicate it
and not just add x'40' to it but make it displayable characters only.
:-)
Tony Thigpen

Greg Smith

unread,
Oct 9, 1998, 3:00:00 AM10/9/98
to

Greg Smith

unread,
Oct 9, 1998, 3:00:00 AM10/9/98
to
Thank you one and all. I have the table I need in hand.

Much appreciated.

Greg Smith.

On Friday, October 09, 1998 10:27 AM, Kevin Mitchell


[SMTP:kev...@KIWI.NET] wrote:
> I hope the following explanation and tables help.
>

> ORG MZVBC2##+X'40'
> DC AL1(0) X'40
> ORG MZVBC2##+X'C1'
> DC AL1(1,2,3,4,5,6,7,8,9) X'C1-C9
> ORG MZVBC2##+X'4A'
> DC AL1(10,11,12,13,14,15,16) X'4A-50
> ORG MZVBC2##+X'D1'
> DC AL1(17,18,19,20,21,22,23,24,25) X'D1-D9
> ORG MZVBC2##+X'5A'
> DC AL1(26,27,28,29,30,31,32,33) X'5A-61
> ORG MZVBC2##+X'E2'
> DC AL1(34,35,36,37,38,39,40,41) X'E2-E9
> ORG MZVBC2##+X'6A'
> DC AL1(42,43,44,45,46,47) X'6A-6F
> ORG MZVBC2##+X'F0'
> DC AL1(48,49,50,51,52,53,54,55,56,57) X'F0-F9
> ORG MZVBC2##+X'7A'


> DC AL1(58,59,60,61,62,63) X'7A-7F
> ORG ,
> *
>
> > -----Original Message-----
> > From: CICS List [mailto:CIC...@UGA.CC.UGA.EDU]On Behalf Of Greg
> > Smith
> > Sent: Thursday, October 08, 1998 3:56 PM
> > To: CIC...@UGA.CC.UGA.EDU
> > Subject: Re: SBA In RECEIVE Data
> >
> >

Bill Lynch

unread,
Oct 10, 1998, 3:00:00 AM10/10/98
to
Greg Smith wrote:
>
> Hi all,
>
> Further to this particular thread........
>
> Does any one know where I can find (or perhaps even better provide me
> with) a table which describes valid 3270 buffer addresses. I need to
> build a native 3270 map and have all the info I require except where to
> put things on the screen!

There's a good explanation in either the CICS Applications Programming
Reference or the A.P.Guide (I can never keep the two straight until I
open the cover). I learned the addressing scheme others have posted back
when the 3270 was new (1972). One of the current CICS manuals has info
which explains that 3270's now support a new buffer addressing scheme,
i.e., the buffer address is the byte no. where the data will start (I
cannot remember if it's relative to zero or to one).

If the input datastream is the same as 25 years ago, the buffer address,
e.g., x'4040', is the buffer position - kill the 2 high-order bits of
each address byte and concatenate the two 6-bit chunks into one 12-bit
3270 buffer address (remember, the 3270, as originally designed, was a
6-bit machine).

E.g.: buffer address = x'4040'
b'01000000 01000000' (space added for readability)
crunch to b'000000 000000'

Buffer address x'4040' is buffer position zero (row 1, column one). Play
with some addresses if this isn't clear, it really does work.

The only other thing I can dredge up from the wetware archive is that
the 2 high-order bits are set one way for 1-9 and another for a-f & 0
(x'40' + 1 = x'c1', that sort of thing). 'Sorry this isn't clearer, but
I haven't gone through the mechanics of this for a looong time.

Reminder, you get an SBA sequence if the screen is formatted, i.e., it
has at least one attribute byte. Otherwise you just get data (we did
this a few months back, check DejaNews).

Bill Lynch

Reynolds Rupert

unread,
Oct 12, 1998, 3:00:00 AM10/12/98
to
AFAIK, the reason for the codes chosen for 0-63dec. is that
they may all be typed directly at a card-punch or TTY keyboard!

It's a looong time since I typed any of that stuff!

Rupert

----------


>From: Kevin Mitchell[SMTP:kev...@KIWI.NET]

>Sent: 09 October 1998 01:26

>I hope the following explanation and tables help.


<SNIP>

Reply all
Reply to author
Forward
0 new messages