Cloverleaf 6.0 – SMAT Archiving EBCDIC threads

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Cloverleaf 6.0 – SMAT Archiving EBCDIC threads

  • Creator
    Topic
  • #54244
    Troy Morton
    Participant

      Current:  Cloverleaf 6.0; AIX 7.1

      Former:   Cloverleaf 5.6; AIX 5.3

      Our SMAT Archive script (used with CL5.6 for years) converts our inbound EBCDIC .msg files to ASCII.  As it reads each message, it performs the following code to convert the message.  However, in Cloverleaf 6.0 this code is failing with a strange and “unhelpful” error.  Can anyone tell me what is going wrong?

      In the thread config we used the new option of “binary” encoding.  But everything else with the thread configuration is the same as it was in 5.6.  We still use hcitpstblconvert to convert the inbound message from EBCDIC to ASCII and that works fine.  So, I’m confused why it would fail when converting a single message as its building the archive file from the SMAT file?

      Code:


        proc convert { msg } {
           variable mape2a       ;# The map table
           adddatamap hci_e2a $mape2a  ;# Make sure its added

           set mh [msgcreate]      ;# Create engine msg handle
           msgset $mh $msg         ;# Store EBCDIC data to handle
           msgmapdata $mh map_e2a  ;# Do conversion`
           set rtnMsg [msgget $mh] ;# get converted message
           msgdestroy $mh          ;# Cleanup message handle
           return $rtnMsg          ;# Return converted message
        }

      Code:


      $ smatarchive  txa8do__i

      /hci/cis6.0/integrator/usercmds/smatarchive – Getting process name for Thread txa8do__i …..

      ROOT: /hci/cis6.0/integrator    SITE: trh_inv_test  PROCESS: txa8do__i
      Cycle and archive txa8do__i.msg ?   y
      Error msg sequence error (max?)
         while executing
      “msgmapdata $mh map_e2a  ”
         (procedure “convert” line 7)
         invoked from within
      “convert $data”
         (procedure “smt::readSMAT” line 99)
         invoked from within
      “smt::readSMAT”
         (procedure “main” line 109)
         invoked from within
      “main [llength $argv] $argv”
         (file “/hci/cis6.0/integrator/usercmds/smatarchive” line 870)

    Viewing 2 reply threads
    • Author
      Replies
      • #80707
        Jim Kosloskey
        Participant

          Troy.,

          I don’t have a specific answer but I think it is related to the fact that the binary encoding takes place after the message is recorded to SMAT and in the engine your EBCDIC/ASCII conversion is taking place after the encoding.

          So your script is seeing the messages before encoding. I suspect you will need to find a way to apply the binary encoding as you read the SMAT file and before you try to convert to ASCII.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #80708
          Peter Heggie
          Participant

            We encountered issues when going from 5.8.4 to 6.0 with inbound EBCDIC messages and storing the messages in SMAT files. We were not able to resend messages from the SMAT file (I believe that is documented in other discussions).

            To simplify processing and solve several problems, we created a new site that performs only SNA reception, EBCDIC to ASCII conversion and HIS handshaking logic. We then forward the ASCII messages to our main Cloverleaf site where the inbound thread stores the messages in the SMAT file. We have tcls in the inbound thread that performs additional, application-level processing. We used to perform the EBCDIC to ASCII conversion here but removed it (moved it to the new site). Now SMAT storage, resending, maintenance and processing is simplified. I don’t know if you could use this technique.

            Peter

            Peter Heggie

          • #80709
            Troy Morton
            Participant

              Thanks Peter.  I like that idea.  I may discuss this with my colleagues and see if anyone agrees.

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.