Visit Sprott's Fractal Gallery!

How we set up SMTP and XMITIP using a non-standard code page

How we set up SMTP and XMITIP on a mainframe with a non-US code page

Background

We use code page 285 (IBM-UK) on the mainframe and 1252 on our PC's

The following is a rough summary of how we got SMTP and XMITIP to work with this. It does not pretend to be complete but should be helpful.

Setup

ALL THIS BIT IS NORMAL

  1. Add SMTP to the AUTOLOG list in the PROFILE.TCPIP
  2. Make sure that the port TCP 25 is reserved for SMTP in the PORT list in PROFILE.TCPIP
  3. Create SYS1.PROCLIB(SMTP) by modifying SEZAINST(SMTPPROC) Our SMTP used a modified TCPIP.DATA with the NSINTERADDR statements removed. FYI we just took the standard one and used ICETOOL to filter out the NSINTERADDR.
  4. Create SYS1.STCJOBS(SMTP) job card
  5. Issue RACF commands to give SMTP a userid and group. We use user OPSSTC and group OVHD but of course you will use what you want.
              RDEFINE STARTED SMTP.*  +
              STDATA( USER(OVHD) GROUP(OPSSTC) PRIVILEGED
                      TRUSTED(NO) TRACE(NO) )
    
  6. Make sure SMTP userid and group have an OMVS segment correctly set up
  7. Create a SMTPCONF member, copying from SEZAINST(SMTPCONF) as first cut, and allocate it to the CONFIG DD of the SMTPPROC.
  8. here is our SMTPCONF member
    .......................................................................
    ;***********************************************************************
    ;                                                                      *
    ;   Name of Data Set:    SMTP.CONFIG                                   *
    ;                                                                      *
    ;   COPYRIGHT = NONE.                                                  *
    ;                                                                      *
    ;   This data set is pointed to by the CONFIG DD statement in the      *
    ;   SMTP Cataloged Procedure (SMTPPROC).                               *
    ;                                                                      *
    ;   This data set is used to specify runtime options and data          *
    ;   to the SMTP server address space.                                  *
    ;                                                                      *
    ;   Syntax Rules for the SMTP configuration data set:                  *
    ;                                                                      *
    ;   (a) All characters to the right of and including a ; will be       *
    ;       treated as a comment.                                          *
    ;                                                                      *
    ;   (b) Blanks and  are used to delimit tokens.           *
    ;                                                                      *
    ;   See the TCP/IP for MVS:  Customization and Administration Guide    *
    ;   for a complete explanation of all the statements.                  *
    ;                                                                      *
    ;***********************************************************************
    ;
    ;  Defaults that normally aren't changed:
    ;
    PORT 25                 ; Port to accept incoming mail
    BADSPOOLFILEID TSOPOST  ; Mailbox where unreadable spool files and
                            ; looping mail are transferred.
    LOG                     ; Log all SMTP mail delivered
    INACTIVE 180            ; Time-out for inactive connections
    FINISHOPEN 120          ; Time-out for opening TCP connections
    RETRYAGE 3              ; Keep retrying mail delivery for 3 days
    WARNINGAGE 1            ; Warn sender that mail has been undeliverable
                            ; for 1 day, but that attempts to deliver the
                            ; mail will continue for another 2 days.
    RETRYINT 20             ; Retry mail delivery every 20 minutes
    MAXMAILBYTES 16777216   ; Largest mail to accept over a TCP connection
    RESOLVERRETRYINT 20     ; Retry pending name resolutions every 20 minutes
    RCPTRESPONSEDELAY 60    ; How long to delay RCPT TO: response when
                            ; waiting for an address resolution.
    TEMPERRORRETRIES 0      ; How many times to retry temporary delivery
                            ; errors.  The default, 0, means retry for
                            ; RETRYAGE days; otherwise the mail is returned
                            ; after this number of deliver attempts.
    SPOOLPOLLINTERVAL 30    ; Amount of time in seconds between spool polling
    TIMEZONE BST            ; Specifies the printable 3-letter name of
                            ; the local time zone.  Remember to change this
                            ; for daylight saving time.
    DEBUG                   ; Normally not used, causes debug information to
                            ; be written to the SMTP DEBUG file.
    ;
    ;***********************************************************************
    ;
    ; The following statements tell SMTP where incoming mail is stored
    ; while it is being queued for delivery.
    ;
    MAILFILEDSPREFIX TPS.TEMP.SMTP.SMC1 ;
    MAILFILEUNIT SYSDA      ; MVS unit name for new file allocations
    ; MAILFILEVOLUME volume ; MVS volume name for new file allocations
    ;
    ;***********************************************************************
    ;
    ; ALTTCPHOSTNAME is used to specify an alternative fully qualified host
    ; name by which SMTP will know the local host.  Mail sent to users at
    ;  is treated as if they were local users.
    ;
    ; ALTTCPHOSTNAME 
    ;
    ;***********************************************************************
    ;
    ; The POSTMASTER statement specifies the mailboxes where mail
    ; addressed to postmaster is spooled.  Multiple POSTMASTER statements
    ; can be specified when not running in SECURE mode.
    ;
    POSTMASTER TSOPOST
    ; POSTMASTER NJEuser@NJEnode
    ; POSTMASTER SMTPuser@SMTPnode
    ;
    ;***********************************************************************
    ;
    ; Use the SMSGAUTHLIST statement to specify the addresses of local
    ; users authorized to issue privileged SMTP SMSG commands.
    ;
    SMSGAUTHLIST
        TSOPOST
      ; OPERATOR  LocalUser
    ENDSMSGAUTHLIST
    ;
    ;***********************************************************************
    ;
    ; The OUTBOUNDOPENLIMIT statement specifies the maximum number of
    ; simultaneous TCP connections over which SMTP will actively deliver
    ; mail.
    ;
    ; OUTBOUNDOPENLIMIT 30
    ;
    ;***********************************************************************
    ;
    ; Configuration for a typical NJE to TCP/IP mail gateway.
    ;
    ;GATEWAY               ; Accept mail from and deliver mail to NJE hosts
    ;NJEDOMAIN BITNET      ; Pseudo domain name of associated NJE network
    ;NJEFORMAT PUNCH       ; NJE recipients receive mail in punch format
    ;NJECLASS B            ; spool class for mail delivered by SMTP to the
    ;                      ; NJE network
    ;LOCALFORMAT NETDATA   ; Local recipients get mail in netdata format
    ;                      ; Netdata allows TSO receive to be used with mai l
    ;LOCALCLASS B          ; Spool class for local mail delivered by SMTP
    ;
    ;***********************************************************************
    ;
    ; Use the ALTNJEDOMAIN to specify an alternate NJE domain name.
    ; This can be useful when the NJE network is known by multiple
    ; domain names, such as "vnet" and "vnet.ibm.com".
    ;
    ; ALTNJEDOMAIN vnet
    ;
    ;***********************************************************************
    ;
    ; The REWRITE822HEADER statement specifies whether SMTP will
    ; rewrite the RFC822 headers on all mail passing from NJE to TCP
    ; through the mail gateway.  The SMTP.RULES data set specifies how the
    ; server is to rewrite the headers.
    ;
    ; The PRINT | NOPRINT options specify whether SMTP will print
    ; the rules to the SMTP output when SMTP starts.
    ;
    REWRITE822HEADER YES NOPRINT
    ;
    ;***********************************************************************
    ;
    ; Use MAILER to specify the address of a batch SMTP server to which
    ; SMTP delivers mail destined for various classes of recipients.  The
    ; old FOLDnoSOURCEroute parameter is equivalent to specifying PUNCH and
    ; NOSOURCEROUTES.
    ;
    ; LOCAL, NJE, and UNKNOWN specify conditions under which mail will
    ; be forwarded to the MAILER - see the Customization and Administration
    ; Guide for further details.
    ;
    ; MAILER MUSER@MNODE PUNCH NOSOURCEROUTES LOCAL NJE UNKNOWN
    ;
    ; MAILER ... UNKNOWN and IPMAILERADDRESS should not be used together.
    ;
    IPMAILERADDRESS 172.17.8.161  ; Routes mail sent to an unknown
    ;                      ; recipient to an SMTP server on an IP network
    ;
    ;***********************************************************************
    ;
    ; The RESTRICT statement specifies addresses of users who cannot
    ; utilize SMTP services.
    ;
    ; RESTRICT RETURN          ; Return mail from restricted users
    ;   charming@ourvm.our.edu ; Don't accept any mail from Prince Charming
    ;   charming@OURVMX        ; via NJE or TCP network.
    ;   charming@ourvm*        ; This line takes the place of previous 2 lines!
    ;  *@castle                ; Don't accept mail from anyone at host castle
    ; ENDRESTRICT
    ;
    ;***********************************************************************
    ;
    ; Use the SECURE statement if this SMTP machine is to run as an SMTP-
    ; to-NJE Secure Gateway.  Only users in the SMTP.SECTABLE data set
    ; will be allowed to send mail, all other mail will be returned or
    ; rejected.  Note that the contents of dataset
    ; mailfiledsprefix.SECURITY.MEMO will be sent to NJE users that are
    ; not authorized to use the gateway.
    ;
    ; SECURE
    ;
    ;***********************************************************************
    ;
    ; Use the DBCS statement if this SMTP machine is to perform DBCS
    ; code conversion on the mail.  Consult the Customization and
    ; Administration Guide for the necessary parameters.
    ;
    ; DBCS   
    ;
    ;
    .......................................................................
    
    Notes:
    • We use a postmaster TSOPOST, which alter as you desire.
    • The HLQ for our work datasets is TPS.TEMP.SMTP.SMC1. Change this to suit you.
    • We use IPMAILERADDRESS to designate a SMTP server in a boxen (attached at 172.17.8.161). You will need to substitute your local address for 172.17.8.161 (If you use other methods I can't help you.)
  9. RACF define postmaster user TSOPOST and make it OMVS capable
  10. Ensure SYS1.PARMLIB(IKJTSO00) has
             TRANSREC      +
                NODESMF((*,*))    +
                DAPREFIX(USERID)  +
    

THIS BIT IS DIFFERENT BECAUSE OF THE NONSTANDARD CODE PAGE

  1. Create a hlq.SMTP.TCPXLBIN dataset using CONVXLAT. This is the table SMTP uses to translate stuff in preference to the default one. (If you check out the manuals you will see the various translate table hierarchies. It may be you will want to use a different table, but this is what we used)

    here is the job we used

    .......................................................................
    //TSO04012 JOB (T951V40),MSGCLASS=T,CLASS=Z,NOTIFY=TSO040,
    //  SCHENV=SYSAFF
    /*JOBPARM SYSAFF=SI01
    //*INCLUDE MEMBER=SYSLEV
    // SET SYSLEV=O2A0
    // SET SYSNAME=SI01
    //*
    //*
    //*    DONE  OS/390 2.10 01/2001
    //*
    //*  ********************************************************
    //*  * THIS JOB MUST BE RUN ON EVERY SYSTEM WHERE SMTP RUNS
    //*  ********************************************************
    //*
    //* 1) SET UP SMTP TRANSLATE TABLES
    //*     FOR UK - MODIFIED.  INPUT IS IN MTCPXLAT
    //*
    // SET DSP=USER.&SYSLEV..&SYSNAME..TCPIP
    // SET IN='INST.SYS1.CUSTOM(MTCPXLAT)'
    // SET SER=IPOCA1
    //***************************************************************
    //*             SMTP TRANSLATE TABLES
    //***************************************************************
    //DEL       EXEC  PGM=IEFBR14
    //SYSUT2    DD DSN=&DSP..SMTP.TCPXLBIN,
    //          DISP=(MOD,DELETE),SPACE=(1,0),UNIT=SYSDA
    //***************************************************************
    //ALLOC     EXEC  PGM=IEFBR14
    //SYSUT2    DD DSN=&DSP..SMTP.TCPXLBIN,
    //          DISP=(NEW,CATLG),SPACE=(256,(185,185)),VOL=SER=&SER,
    //          DCB=(RECFM=F,LRECL=256,BLKSIZE=256),UNIT=SYSALLDA
    //***************************************************************
    //CONVXLAT  EXEC  PGM=IKJEFT01,
    // PARM='CONVXLAT ''&IN'' ''&DSP..SMTP.TCPXLBIN'''
    //SYSPRINT  DD    SYSOUT=*
    //SYSTSPRT  DD    SYSOUT=*
    //SYSTSIN   DD    DUMMY
    .......................................................................
    
    Rip it off changing hlq etc as suitable

    Here is INST.SYS1.CUSTOM(MTCPXLAT), our input to the xlate tables:

    .......................................................................
    ;
    ;
    ; This translate table is from SEZATCPX(UK), slightly modified
    ; to shoW THE POUND SIGN, HEX 5B IN MC1, TO SHOW ON MS PC'S USING PAGE
    ; 1252, where the pound sign is hex A3.
    ;
    ; The E-to-A table has had position 5B, which was hex 9C, swapped
    ; with position DE which was hex A3.
    ;
    ; And the A-to-E table has had position 9C, which was hex 5B,
    ; swapped with positon A3, which was hex DE
    ;
    ;
    ;
    ; Also the not sign, which is hex 5F ON MC1, is hex AC on MS PS's
    ;
    ;
    ; The E-to-A table has had position 5F, which was hex AA, swapped
    ; with position B7 which was hex AC.
    ;
    ; And the A-to-E table has had position AA, which was hex 5F,
    ; swapped with positon AC, which was hex B7
    ;
    ;
    ; ASCII-to-EBCDIC table for English (UK) CECP Code Page 285
    ; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    ;
      00 01 02 03 37 2D 2E 2F 16 05 25 0B 0C 0D 0E 0F     ; 00 ;
      10 11 12 13 3C 3D 32 26 18 19 3F 27 1C 1D 1E 1F     ; 10 ;
      40 5A 7F 7B 4A 6C 50 7D 4D 5D 5C 4E 6B 60 4B 61     ; 20 ;
      F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 7A 5E 4C 7E 6E 6F     ; 30 ;
      7C C1 C2 C3 C4 C5 C6 C7 C8 C9 D1 D2 D3 D4 D5 D6     ; 40 ;
      D7 D8 D9 E2 E3 E4 E5 E6 E7 E8 E9 B1 E0 BB BA 6D     ; 50 ;
      79 81 82 83 84 85 86 87 88 89 91 92 93 94 95 96     ; 60 ;
      97 98 99 A2 A3 A4 A5 A6 A7 A8 A9 C0 4F D0 BC 07     ; 70 ;
      68 DC 51 42 43 44 47 48 52 53 54 57 56 58 63 67     ; 80 ;
      71 9C 9E CB CC CD DB DD DF EC FC 70 DE 80 BF FF     ; 90 ;
      45 55 CE 5B 49 69 9A 9B AB AF B7 B8 5F AA 8A 8B     ; A0 ;
      2B 2C 09 21 28 65 62 64 B4 38 31 34 33 B0 B2 24     ; B0 ;
      22 17 29 06 20 2A 46 66 1A 35 08 39 36 30 3A 9F     ; C0 ;
      8C AC 72 73 74 0A 75 76 77 23 15 14 04 6A 78 3B     ; D0 ;
      EE 59 EB ED CF EF A0 8E AE FE FB FD 8D AD A1 BE     ; E0 ;
      CA 8F 1B B9 B6 B5 E1 9D 90 BD B3 DA FA EA 3E 41     ; F0 ;
    ;
    ; EBCDIC-to-ASCII table for English (UK) CECP Code Page 285
    ; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    ;
      00 01 02 03 DC 09 C3 7F CA B2 D5 0B 0C 0D 0E 0F     ; 00 ;
      10 11 12 13 DB DA 08 C1 18 19 C8 F2 1C 1D 1E 1F     ; 10 ;
      C4 B3 C0 D9 BF 0A 17 1B B4 C2 C5 B0 B1 05 06 07     ; 20 ;
      CD BA 16 BC BB C9 CC 04 B9 CB CE DF 14 15 FE 1A     ; 30 ;
      20 FF 83 84 85 A0 C6 86 87 A4 24 2E 3C 28 2B 7C     ; 40 ;
      26 82 88 89 8A A1 8C 8B 8D E1 21 A3 2A 29 3B AC     ; 50 ;
      2D 2F B6 8E B7 B5 C7 8F 80 A5 DD 2C 25 5F 3E 3F     ; 60 ;
      9B 90 D2 D3 D4 D6 D7 D8 DE 60 3A 23 40 27 3D 22     ; 70 ;
      9D 61 62 63 64 65 66 67 68 69 AE AF D0 EC E7 F1     ; 80 ;
      F8 6A 6B 6C 6D 6E 6F 70 71 72 A6 A7 91 F7 92 CF     ; 90 ;
      E6 EE 73 74 75 76 77 78 79 7A AD A8 D1 ED E8 A9     ; A0 ;
      BD 5B BE FA B8 F5 F4 AA AB F3 5E 5D 7E F9 EF 9E     ; B0 ;
      7B 41 42 43 44 45 46 47 48 49 F0 93 94 95 A2 E4     ; C0 ;
      7D 4A 4B 4C 4D 4E 4F 50 51 52 FB 96 81 97 9C 98     ; D0 ;
      5C F6 53 54 55 56 57 58 59 5A FD E2 99 E3 E0 E5     ; E0 ;
      30 31 32 33 34 35 36 37 38 39 FC EA 9A EB E9 9F     ; F0 ;
    .......................................................................
    
  2. If you are using XMITIP you must set up the same E-to-A table in customisable exec XMITIPTR.

    Here is our XMITIPTR (level 4.30) (In later levels I think this table moves to TXT2PDFX)

    .......................................................................
            /* --------------------  rexx procedure  -------------------- *
             * Name:      XMITIPTR                                        *
             *                                                            *
             * Function:  The translate table used by XMITIPD             *
             *                                                            *
             * Syntax:    str = xmitiptr()                                *
             *                                                            *
             * Author:    Lionel B. Dyck                                  *
             *            Kaiser Permanente Information Technology        *
             *            Walnut Creek, CA 94598                          *
             *            (925) 926-5332                                  *
             *            Internet: lionel.b.dyck@kp.org                  *
             *                                                            *
             * Changes may be made here if necessary (e.g. for UK Pound)  *
             *                                                            *
             * History:                                                   *
             *            11/08/2000 - moved from XMITIPD                 *
             *                                                            *
             * ---------------------------------------------------------- */
                      /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
             strE2A =  '00010203DC09C37FCAB2D50B0C0D0E0F'x || ,  /* 00-0f */
                       '10111213DBDA08C11819C8F21C1D1E1F'x || ,  /* 10-1f */
                       'C4B3C0D9BF0A171BB4C2C5B0B1050607'x || ,  /* 20-2f */
                       'CDBA16BCBBC9CC04B9CBCEDF1415FE1A'x || ,  /* 30-3f */
                       '20FF838485A0C68687A4242E3C282B7C'x || ,  /* 40-4f */
                       '268288898AA18C8B8DE121A32A293BAC'x || ,  /* 50-5f */
                       '2D2FB68EB7B5C78F80A5DD2C255F3E3F'x || ,  /* 60-6f */
                       '9B90D2D3D4D6D7D8DE603A2340273D22'x || ,  /* 70-7f */
                       '9D616263646566676869AEAFD0ECE7F1'x || ,  /* 80-8f */
                       'F86A6B6C6D6E6F707172A6A791F792CF'x || ,  /* 90-9f */
                       'E6EE737475767778797AADA8D1EDE8A9'x || ,  /* a0-af */
                       'BD5BBEFAB8F5F4AAABF35E5D7EF9EF9E'x || ,  /* b0-bf */
                       '7B414243444546474849F0939495A2E4'x || ,  /* c0-cf */
                       '7D4A4B4C4D4E4F505152FB9681979C98'x || ,  /* d0-df */
                       '5CF6535455565758595AFDE299E3E0E5'x || ,  /* e0-ef */
                       '30313233343536373839FCEA9AEBE99F'x       /* f0-ff */
             return strE2A
    .......................................................................
    
  3. GOOD LUCK!! believe me it works a treat.
MVS pages