*COPY                                                 IK0DEF            01400000
         TITLE 'Kermit-370 Control blocks and constants'       @SC86268 01401000
         PRINT NOGEN                                                    01402000
         FDBD  ,                                               @SC86295 01403000
         USING COMMON,10                                       @SC86316 01404000
         USING STORAG,11                                       @SC86316 01405000
         SYSMACS ,           System-dependent macros           @SC86268 01406000
*                                                                       01407000
         GBLC  &KVRSN,&KSYS,&KDATE,&RTN,&TYPCMD,&S1CMD         @SC86355 01408000
         GBLA  &MAXLR,&MAXBS                                   @SC86268 01409000
&KVRSN   SETC  '4.0'                                           @SC87320 01410000
&KDATE   SETC  '87/12/17'                                      @SC87351 01411000
         SSYMS ,                                               @SC86268 01412000
* EBCDIC constants                                                      01413000
SOH      EQU   X'01'                 ctl-A in Ascii/Ebcdic              01414000
XON      EQU   X'11'                 xon in Ascii/Ebcdic                01415000
NL       EQU   X'15'                                                    01416000
CR       EQU   X'0D'                 CR in Ascci and Ebcdic             01417000
LF       EQU   X'25'                 LF in Ebcdic                       01418000
TAB      EQU   X'05'                 Ebcdic tab                         01419000
SUB      EQU   X'3F'                 Ebcdic ctl-Z                       01420000
* Ascii constants                                                       01421000
*   1st, all letters and digits:                               @SC86262 01422000
         ASCSYM ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789           @SC86262 01423000
*   and a few others:                                                   01424000
A#       EQU   35                    Ascii #                            01425000
ALF      EQU   10                    Ascii LF                           01426000
ADOT     EQU   46                    Ascii dot                          01427000
AAMP     EQU   38                    Ascii ampersand                    01428000
ABL      EQU   32                    Ascii space                        01429000
AUP      EQU   94            Ascii up-arrow (^)                @SC86165 01430000
ADEL     EQU   127                   Ascii delete/rubout                01431000
ATIL     EQU   126                   Ascii Tilde                        01432000
* Flags for extracting filespec                                @SC86295 01433000
FFRCF    EQU   X'40'         RECEIVE or foreign filespec       @SC86295 01434000
FFSND    EQU   X'20'         SEND                              @SC86295 01435000
FFGET    EQU   X'10'         GET                               @SC86295 01436000
FFWLD    EQU   X'08'         Treat incomplete filespec as wild @SC86295 01437000
FFNEW    EQU   X'02'         Get unique name (in place)        @SC86295 01438000
FFUTL    EQU   FFSND+FFGET   Extract for file utility          @SC86295 01439000
FFHDR    EQU   FFUTL+FFRCF   Decode Kermit file header         @SC86295 01440000
FFENC    EQU   FFNEW+FFRCF   Encode Kermit file header         @SC86295 01441000
FFDSP    EQU   FFNEW+FFSND   Copy name in standard print form  @SC86295 01442000
FFGIV    EQU   FFWLD         Like TAKE, but use for output     @SC87117 01443000
* Miscellaneous constants                                               01444000
KMIN     EQU   20                    Kermit protocol minimum pkt size   01445000
KMAX     EQU   94                    Kermit protocol maximum pkt size   01446000
KMAXF    EQU   KMAX+1        Kermit xtended pkt base           @TB86196 01447000
KMAXESIZ EQU   KMAXE+7 SOH+LEN+NUM+TYPE+LENX1+LENX2+HCHECK     @TB86196 01448000
KDEF     EQU   80                    Kermit protocol default pkt size   01449000
LPKT     EQU   KMAXESIZ+KMAX+1 Packet buffer size (with pad)   @SC86202 01450000
MAXNSENT EQU   512           Size of 'sent' table              @SC86190 01451000
TAKMAX   EQU   10                    Max TAKE nesting level             01452000
FORMAXL  EQU   31            Maximum file prefix/suffix size   @HF86223 01453000
* 3270 orders:                                                          01454000
SBA      EQU   X'11'                 Set Buffer Address (3270)          01455000
