University ITS
Data Administration

Defining a Page Segment in your program


Once you have created a page segment, you can use it in your letter writer programs. Coding the page segment in a program must be done precisely following the instruction explained below. If you do not follow these steps you will alter the page segment code with unpredictable results. IT MUST BE CODED IN HEX. You can copy an existing line of code but you will still have to edit it in HEX. All the characters do not transfer correctly all the time.

This is a coded page segment:

         !""L®^""   S1SIGMLL"ŸdŸ""
 
The hex code would look like this:
 
        5A0016D3AF5F000005E2F1E2C9C7D4D3D3000078FFFFFF
carr
cntl
field
length
defines
psegment
label
field
page segment
name
X
Coordinate
Y
Coordinate
5A0016D3AF5F000005 E2F1E2C9C7D4D3D3000078FFFFFF

constant

constant

constant

constant
this example is
S1SIGMLL
this is
0.5 inch
variable
(null)

Note: See table below for X and Y coordinate values.

To enter the data in your program while in XEDIT, bring the line you are working on to the current line and type the following:

    SET IMAGE OFF
    SET CASE M
    SET HEX ON
Below is an example of COBOL code used for SIGMA letter writer programs. In this program the '!' (5A) is coded in a seperate field for the carriage control. However you code it, this must be in column 1 of the print line. When the printer sees this 5A hex code in the carriage control position it knows that the rest of the code in that line needs special handling.

  *****************************************************************
   01  COPY-GROUP-INFO.
       05  CCC                 PIC X(01)  VALUE '!'.
       05  WS-COPY-RECORD.
           10  FILLER          PIC X(08)  VALUE '""L?o"""'.
           10  WS-COPY-GROUP   PIC X(08)  VALUE SPACES.
   01  TRANSFORM-FLAG              PIC X(01) VALUE 'N'.
   01  SIGNATURE-CODE   PIC X(23) VALUE '""L0¢"" S1SIGMLL""d"""'.
   01  REV-NOTIF-CODE   PIC X(23) VALUE '""L0¢"" S1REVISE" h""q'.
  *****************************************************************

The position of the code in this example will go between columns 45 and 66 (between the single quotes)

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7.
      01  SIGNATURE-CODE   PIC X(23) VALUE '                      '

Type - V HEX 45 66 (The screen will change to hex - below)

        + . . . . .5. . . . + . . . . .6. . . . + .
        40404040404040404040404040404040404040404040

Start typing the hex code exactly as in the table above (in this case starting with the 0016 field). When you get to the page segment name you can enter the first four characters (2 bytes) E2F1 (S1) and leave the next 12 characters (6 bytes) blanks (40 hex) and change them later. Of course if you know the hex codes for the name just type them in. The next six characters (3 bytes) are the 'X' position. This is the position from left to right. Run the INHEX EXEC to find this code. The last six characters (3 bytes) are the 'Y' position. This will normally be coded as 'FFFFFF' to allow the page segment to float up and down the page. If you want the image in a permanent position on the page you must also code this using the HEX value table.

**IMPORTANT** Any time you work on this line you must type in all of the commands (SET IMAGE OFF, SET CASE M, SET HEX ON). If you even try to change one character, whether it is part of the page segment or not, it will altered and will not work.

HEX values for X and Y coordinates.
Inches HEX
Value
Inches HEX
Value
Inches HEX
Value
0.0000000 3.7000378 7.40006F0
0.1000018 3.8000390 7.5000708
0.2000030 3.90003A8 7.6000720
0.3000048 4.00003C0 7.7000738
0.4000060 4.10003D8 7.8000750
0.5000078 4.20003F0 7.9000768
0.6000090 4.3000408 8.0000780
0.70000A8 4.4000420 8.1000798
0.80000C0 4.5000438 8.20007B0
0.90000D8 4.6000450 8.30007C8
1.00000F0 4.7000468 8.40007E0
1.1000108 4.8000480 8.50007F8
1.2000120 4.9000498 8.6000810
1.3000138 5.00004B0 8.7000828
1.4000150 5.10004C8 8.8000840
1.5000168 5.20004E0 8.9000858
1.6000180 5.30004F8 9.0000870
1.7000198 5.4000510 9.1000888
1.80001B0 5.5000528 9.20008A0
1.90001C8 5.6000540 9.30008B8
2.00001E0 5.7000558 9.40008D0
2.10001F8 5.8000570 9.50008E8
2.2000210 5.9000588 9.6000900
2.3000228 6.00005A0 9.7000918
2.4000240 6.10005B8 9.8000930
2.5000258 6.20005D0 9.9000948
2.6000270 6.30005E8 10.0000960
2.7000288 6.4000600 10.1000978
2.80002A0 6.5000618 10.2000990
2.90002B8 6.6000630 10.30009A8
3.00002D0 6.7000648 10.40009C0
3.10002E8 6.8000660 10.50009D8
3.2000300 6.9000678 10.60009F0
3.3000318 7.0000690 10.7000A08
3.4000330 7.10006A8 10.8000A20
3.5000348 7.20006C0 10.9000A38
3.6000360 7.30006D8 11.0000A50


Last updated: 13 Nov 2001