resend transaction without gui (NOT SMAT)

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf resend transaction without gui (NOT SMAT)

  • Creator
    Topic
  • #53504
    Todd Horst
    Participant

      im looking for the command line equivalent of

      opening a server/site

      opening net monitor

      right click thread

      control>>full>>resend

      Thanks

    Viewing 18 reply threads
    • Author
      Replies
      • #77895
        Michael Hertel
        Participant

          Use hcicmd (See last line below for example) (this is for unix)

          Syntax:

             hcicmd -p [-t ] [-h host] [-c …] [-v] [-help]

                 -h       – process host machine

                 -p    – engine process name, optional if -t is ‘d’

                 -t       – type of process: e (engine) or d (daemon)

                                    (defaults to engine)

                 -c        – just execute the command

                 -v              – verbose

                 -help           – show usage help message

          use -c to send the command

          Expected: []

          Valid commands are:

          die            stop the engine             :: . die

          eo_alias       apply output alias          :: eo_alias

          eo_en          enable trace output         :: eo_en

          eo_dis         disable trace output        :: eo_dis

          fwd_start      start msg forwarding        :: fwd_start

          fwd_stop       stop msg forwarding         :: fwd_stop

          fwdr_start     start reply forwarding      :: fwdr_start

          fwdr_stop      stop reply forwarding       :: fwdr_stop

          output_cycle   Cycle the engine output file:: . output_cycle

          purgex         purge translation caches    :: . purgex

          pstart         start a connection          :: pstart

          pstop          stop a connection           :: pstop

          phold_obd      hold OB data messages       :: phold_obd

          prls_obd       release OB data messages    :: prls_obd

          reindex        reload Tcl auto-load indices:: reindex

          reload         reload Tcl procedure        :: reload

          resend_errordb resend message from error db :: . resend_errordb [ ]

          resend         resend message(s)           :: resend

          save_start     start saving protocol msgs  :: save_start {in|out}

          save_stop      stop saving protocol msgs   :: save_stop {in|out}

          save_cycle     cycle save message file     :: save_cycle {in|out}

          xhold_post     hold post-xlate queue       :: xhold_post

          xrel_post      release post-xlate queue    :: xrel_post

          disable_event  disable event in a thread   :: disable_event

          enable_event   enable event in a thread    :: enable_event

          disable_scheduldisable schedule            :: disable_schedule

          enable_scheduleenable schedule             :: enable_schedule

          schedule_statusget schedule status         :: schedule_status

          event_status   get event status            :: event_status

          current_event  get current event           :: current_event

          curr_event_str get current event string    :: curr_event_str

          client_list    list multi-server clients   :: client_list

          client_drop    drop a multi-server client  :: client_drop

          thread_id      show thread namess & id’s   :: . thread_id

          hcicmd -p -c ‘ resend ‘

          Example:

          hcicmd -p myprocess -c ‘my_outbound_thread resend ob_post_tps data 5120 /hci/qdx5.7/integrator/vm5_adt/data/my_resend_file.dat nl’

        • #77896
          Robert Kersemakers
          Participant

            When you’re in the Network Monitor, you can turn on ‘Command and Engine Output’ via menu ‘View’ (or use CTRL-E). This pane will show all the commands that are executed when you do something via the GUI, like say stop a thread, start a process or resend a message.

            This way you can easily see what command you need to use.

            Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

          • #77897
            Peter Heggie
            Participant

              Perhaps the original request is similar to what I am looking for.

              We added a new interface to production. Now they want eight days of ADT sent to their (outbound/destination thread) interface.

              So I have 32 smat files to resend. I do not want to use the GUI to open each of those smat files and save to a file, and then run the hcicmd resend to submit all those messages – I could just as well sit in the GUI, open each smat file and resend all messages to the new destination.

              What I really want is a command-line command that lets me resend all messages to a destination, directly from the smat file – just like I can in the GUI. I thought all GUI commands were available in the command-line, but actually it seems like I have to save them to another file first.

              Is there no other way?

              Peter

              Peter Heggie

            • #77898
              Michael Hertel
              Participant

                Use hcismat

                usage: hcismat -i filename ?-pri priority? ?-nl? ?-reply? ?-ib?

                where:

                   -i       Input filename

                   -pri     Resend priority  (4096 – 8192) Default = 5120

                   -reply              Resend selected messages as reply instead of data

                   -ib                 Resend selected messages as inbound instead of outbound

                   -nl                 Write file as newline delimited, default is len10

                is exactly one of:

                   -orut      Resend unselected messages to thread

                   -oruf    Resend unselected messages to file

                   -orst      Resend selected messages to thread

                   -orsf    Resend selected messages to file

                is any valid grouping of:

                   -sds         Starting at date and time yyyymmdd[hhmmss]

                   -sde         Ending at date and time   yyyymmdd[hhmmss]

                   -sdn                Not meaning of date search

                   -sms          Starting at message id    [0.0.]###

                   -sme          Ending at message id      [0.0.]###

                   -smn                Not meaning of mid search

                   -sall               Select all messages in input file

              • #77899
                Peter Heggie
                Participant

                  When I use that syntax to specify the smat file I use the .msg file. It returns “First read on file failed: non-numeric length-encode string”.

                  source_thread=”xfr_chanc_vxu”

                  dest_thread=”to_db_vxu”

                  smatfile=”/test/cis6.0/shutltst/exec/processes/xfranc/xfr_chanc_vxu_ib.msg”

                  hcicmd -p xfranc -c “$source_thread resend ib_pre_tps $dest_thread data 5120 $smatfile len10”

                  Peter Heggie

                • #77900
                  Michael Hertel
                  Participant

                    hcismat, not hcicmd…  ðŸ™‚

                  • #77901
                    Peter Heggie
                    Participant

                      I missed that – thank you.

                      and I miss my online help, I can’t see it with IE 11.

                      Can hcismat resend to a specified destination thread??

                      Peter Heggie

                    • #77902
                      Michael Hertel
                      Participant

                        Yes, try this:

                        hcismat -i $smatfile -orst $dest_thread -sall

                        That being said, I’m starting to wonder about $smatfile.

                        The documentation is not clear.

                        I don’t know if it is:

                        Smatfile

                        Smatfile.idx

                        Smatfile.msg

                      • #77903
                        Peter Heggie
                        Participant

                          ok I can try that, but can I specify the inbound thread to submit into, and also which destination thread it should route to? This functionality exists for the resend command.

                          Peter Heggie

                        • #77904
                          Michael Hertel
                          Participant

                            I’m sorry, I was kind of assuming you were resending multiple outbound smat files.

                            You can resend inbound smat messages but depending on your version of Cloverleaf, you may not be able to specify the outbound target thread. All outbound threads would reprocess.

                            Maybe someone else has a better answer?

                          • #77905
                            Russ Ross
                            Participant

                              Anytime I want to know the syntax of a command to simulate what I’m doing in Netmonitor, I let the GUI show me the command it runs by specifying (view -> command and engine output).

                              With this setting the commands invoked by your GUI action will be displayed, then I simply steal them as I choose.

                              Russ Ross
                              RussRoss318@gmail.com

                            • #77906
                              Peter Heggie
                              Participant

                                ok just to be clear – I want a command line command that will resend from a specified smat file. The GUI does not have a View -> command option, nor does the GUI window for SMAT resends show the command line version at the bottom.

                                The help for hcismat, and the resulting error messages when I tried it, seem to imply that the messages are found in a file, i.e. a regular file, not a smat file. This file referenced in the command – is that a file that I previously saved smat messages to?

                                So that means I have to go to the trouble of using the GUI just to prepare a file that I can then use on the command line. Do I have that right?

                                Or can someone give me a command I can enter for smat file ‘x.y.z.idx’ and for inbound thread ‘fr_abc”.

                                Here is the error when I specify a real smat file:

                                hcismat: Invalid argument bad variable name “::SMAT::argArray(TARGET)”: upvar won’t create a scalar variable that looks like an array element                                                          

                                                                                                                                   

                                                                                                                                   

                                                                                                                                   

                                usage: hcismat -i filename ?-pri priority? ?-nl? ?-reply? ?-ib?                                                                                                

                                where:                                                                                              

                                   -i       Input filename                                                              

                                   -pri     Resend priority  (4096 – 8192) Default = 5120                              

                                   -reply              Resend selected messages as reply instead of data                          

                                   -ib                 Resend selected messages as inbound instead of outbound                    

                                   -nl                 Write file as newline delimited, default is len10                          

                                actual command entered:

                                hcismat -i fr_uds_cm_ib.283.1 -orst fr_uds_cm -ib -sall

                                Thanks

                                Peter Heggie

                              • #77907
                                Russ Ross
                                Participant

                                  If this approach is of interest, check out the following 3 scripts that will convert any smat file to newline even if messages aren’t HL7

                                     ebcdic_smat_to_nl.ksh

                                     len10_to_nl.pl

                                     ascii_smat_to_nl.ksh

                                  that I previously posted at the following URL

                                  <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=1539&&#8221; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=1539&amp;

                                  Once the SMAT files are converted into friendlier new-line terminated messages, those are what I then use to resend.

                                  Russ Ross
                                  RussRoss318@gmail.com

                                • #77908
                                  Peter Heggie
                                  Participant

                                    thank you I will try to put those into a script that can handle a directory full of smat files.

                                    Do you think native functionality in Cloverleaf to allow for command line smat resubmission is useful?

                                    Peter Heggie

                                  • #77909
                                    Peter Heggie
                                    Participant

                                      ok I guess I have a different problem. When I ran that script – ascii_smat_to_nl.ksh, I got the same error:

                                      hcismat: Invalid argument bad variable name “::SMAT::argArray(TARGET)”: upvar won’t create a scalar

                                      variable that looks like an array element                                                          

                                      is this a tcl environment issue?

                                      Peter Heggie

                                    • #77910
                                      Russ Ross
                                      Participant

                                        Code:

                                        Do you think native functionality in Cloverleaf to allow for command line smat resubmission is useful?

                                        Yes I consider backend access to SMAT messages useful and is my preference as opposed to the SMAT GUI tool most of the time.

                                        I haven’t launched the SMAT GUI tool hardly at all over the last decade.

                                        For other people they can’t live without the SMAT GUI tool because they are less comfortable with backend access.

                                        On the backend, I have on several occasions done large backloads of more than a month, practically unattended once I get it setup, to use a load thread with throttling to loop thru the new-line terminated files cretated from SMAT archives.

                                        Russ Ross
                                        RussRoss318@gmail.com

                                      • #77911
                                        Peter Heggie
                                        Participant

                                          Me too. It is a ‘not so perfect world’, so we end up having to resubmit large numbers of smat files once a month or so. Just can’t do that using the GUI.

                                          Peter Heggie

                                        • #77912
                                          Russ Ross
                                          Participant

                                            Also be aware there is a bug with resending from SMAT that will recycle the SMAT file, at least for Cloverleaf 6.0.

                                            Even when I do rarely use SMAT in the GUI it is just for viewing.

                                            I don’t trust the SMAT GUI under cloverleaf 6.0 to ever do a resend or write to a file.

                                            Russ Ross
                                            RussRoss318@gmail.com

                                          • #77913
                                            Charlie Bursell
                                            Participant

                                              Try the hcismat or hcismatdb scripts that I have previously posted

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