ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

TL Ashford Queues

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TL Ashford Queues

    I have just inherited handling TLA requests. Is there an easy way to control the output queues for the labels. I know LBLDEV is not used for this. Any assistance is appreciated.

  • #2
    Re: TL Ashford Queues

    Very simple:

    OVRPRTF FILE(BCLABELS) CPI(15) OUTQ(YOURLABELOUTQHERE)
    Then call to print the labels.
    Bill
    "A good friend will bail you out of jail,
    A true friend would be sitting beside you saying,
    'Wow, that was fun.'"

    Comment


    • #3
      Re: TL Ashford Queues

      The first 100 positions of the tables are
      you can toss any old outqueue you want in there
      Code:
           *  TLA barcode labels - TITAN labels              
          A          R TLA05DSR                              
          A            LABEL          8                      
          A            USER          10                      
          A            OUTQ          10                      
          A            QUANTITY       4S 0                   
          A            PRONUMBER      7S 0                   
          A            LABELID#       7S 0                   
          A            FILLER1       50     
        *                                      
          A            ORDER          7  0        
          A            PO#           16           
          A            CUSTOMER      30           
          A            ITEMDESC      30           
          A            NOTE1         30           
          A            ITEMDESC2     30           
          A            PART          16           
          A            TAG            7  0        
          A            PIECES         5  0                         
           *                                          
          A            HEAT          12      
          A            NOTE2         30      
          A            NOTE3         30      
           *                                 
          A            FILLER      3765A
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment


      • #4
        Re: TL Ashford Queues

        You must be a new version of TLA. I never has seen this info in a record brfore

        we always:

        PHP Code:
        call    TLaProg
        parm       Labelname          10
        parm       Across              2  0
        parm       Outque             10
        parm       LabelQty            4  0
        parm       Demand              1
        parm       RecLayout 
        (as defined in the label designdefined in DS)
        parm       Perset              4 0 
        I have never seen USER defined in the call before. We would create the RecLayour and use it in nthe design of the label, then in a DS in the program with a length of 1024 depending on the label printer.
        Last edited by Billw; March 9, 2009, 02:36 PM.
        Bill
        "A good friend will bail you out of jail,
        A true friend would be sitting beside you saying,
        'Wow, that was fun.'"

        Comment


        • #5
          Re: TL Ashford Queues

          there is a 1024 version and also a 4096 version (I think they are different commands....) I will try to post more, before the weekend.

          im doing funny stuff ... here is the command in the main program (looks just like yours )
          PHP Code:
          d $PrintLabels    pr                  extpgm('Z4XI4096')                    
          d   labelname                    8    const                                 
          d   across                       2  0 const                                 
          d   Outqueue                    10    const                                 
          d   WorkingQty                   4  0 const                                 
          d   demand                       1    const                                 
          d   mergedata                 4096    const                                 
          d   perset                       4  0 const 
          All my answers were extracted from the "Big Dummy's Guide to the As400"
          and I take no responsibility for any of them.

          www.code400.com

          Comment


          • #6
            Re: TL Ashford Queues

            yup our executable is a variable depending on the label printer selected, but most of the time it is Z4XI41024, 1024 covers more than most label ever need.
            Bill
            "A good friend will bail you out of jail,
            A true friend would be sitting beside you saying,
            'Wow, that was fun.'"

            Comment


            • #7
              Re: TL Ashford Queues

              here is a stripped down version (showing only two labels) we use dataqueues to process the requests which are then funneled thru a NEP....

              Yes That dataq is hardcoded to my library.. (for example only)

              Code:
                    *
                    * PROGRAM - BRC00
                    * PURPOSE - Main barcode processing program
                    * WRITTEN - 
                    * AUTHOR  - jamie flanary
              
                    * PROGRAM DESCRIPTION
                    *   This program will loop in batch and process all barcode label
                    *   requests thru dataqueue BR2BARCODE.
                    *
                    * INDICATOR USAGE
                    *--------------------------------------------------------
                    *
                   d cmdlength       s             15  5
                   d cmdstring       s            256
                   d dataqueue       s             10    inz('BR2BARCODE')
                   d dataqueueLib    s             10    inz('JAMIELIB')
                   d dataqueueLen    s              5  0 inz(4096)
                   d datawait        s              5  0 inz(-1)
                   d EndProgram      s               n
                   d outprtf         s             10
                   d outhold         s              1
                   d outcopies       s              4  0
                   d outmode         s              1
                   d outtype         s              1
                   d QueueData       s           4096
                   d workingLabel    s              8
                   d workingprogram  s             10
                   d workingQty      s              4  0
                   d workinguser     s             10
                   d workingoutq     s             10
              
                    //
                    // Label format(s)
                    //
              
                   d BRC01           ds                  qualified
                   d   Label                        8
                   d   InUser                      10
                   d   InOutQ                      10
                   d   InQty                        4  0
                   d   cname                       30
                   d   job#                        30
                   d   part#                       25
                   d   material                     3
                   d   analysis                     4
                   d   size                         7
                   d   pronumber                    7  0
                   d   counter                      3  0
                   d   filler                    3960
              
                   d BRC02           ds                  qualified
                   d   Label                       08
                   d   user                        10
                   d   InOutQ                      10
                   d   Quantity                     4  0
                   d   pronumber                    7  0
                   d   something                    3  0
                   d   ofnumber                     3  0
                   d   shipdate                     8
                   d   truck                        5
                   d   zone                        30
                   d   customer                    30
                   d   priority                     1
                   d   customerpo                  16
                   d   orderqty                     7  0
                   d   desc1                       30
                   d   desc2                       40
                   d   weight                       7  0
                   d   part                        25
                   d   heat                        12
                   d   orderqty2                    7  0
                   d   desc12                      30
                   d   desc22                      40
                   d   weight2                      7  0
                   d   part2                       25
                   d   heat2                       12
                   d   orderqty3                    7  0
                   d   desc13                      30
                   d   desc23                      40
                   d   weight3                      7  0
                   d   part3                       25
                   d   heat3                       12
                   d   orderqty4                    7  0
                   d   desc14                      30
                   d   desc24                      40
                   d   weight4                      7  0
                   d   part4                       25
                   d   heat4                       12
                   d   fromname                    30
                   d   fromnote1                   30
                   d   fromnote2                   30
                   d   fromnote3                   30
                   d   fromnote4                   30
              
                   d   filler                    3327
              
                    //
                    // External calls
                    //
              
                   d $RcvDtaQ        pr                  extpgm('QRCVDTAQ')
                   d   dataqueue                   10
                   d   dataqueueLib                10
                   d   dataqueueLen                 5  0
                   d   QueueData                 4096
                   d   datawait                     5  0
              
                   d $PrintLabels    pr                  extpgm('Z4XI4096')
                   d   labelname                    8    const
                   d   across                       2  0 const
                   d   Outqueue                    10    const
                   d   WorkingQty                   4  0 const
                   d   demand                       1    const
                   d   mergedata                 4096    const
                   d   perset                       4  0 const
              
                   d $command        pr                  extpgm('QCMDEXC')
                   d   command                   5000    options(*varsize)
                   d   Length                      15  5
              
                    /COPY lbisrc/QPGMSRC,MSC1CTRL
              
                    /free
              
                      in DACTRL;
              
                     // add TLASHFORD to library list
              
                          cmdstring = 'addlible TLABARCODE *LAST';
                          cmdlength = %len(%trim(cmdstring));
              
                          monitor;
                           $command(cmdstring : cmdlength);
                          on-error;
                          endmon;
              
                            dow EndProgram = *off;
              
                     // position 1-10 is reserved for the program name
                     // this will tell the barcode driver program which data structure to use
              
                             $RcvDtaQ (Dataqueue    :
                                       DataQueueLib :
                                       DataQueueLen :
                                       QueueData    :
                                       datawait     );
              
                           //  The label name is always the first 8 char of
                           //  data sent so use this to populate the correct
                           //  data structure(s)
                           //
                           //  override the barcodes to the correct outqueue the
                           //  outqueue will always be in position 9 length 10
              
                             WorkingLabel = %subst(Queuedata:1:8);
                             Workingprogram = WorkingLabel;
                             WorkingOutq  = %subst(Queuedata:19:10);
                             WorkingQty   = %dec(%subst(Queuedata:29:4):4:0);
              
                              %subst(Queuedata:19:10) = workingoutq;
                              cmdstring = 'OVRPRTF FILE(BCLABELS) CPI(15) OUTQ('  +
                                          %trim(WorkingOutq) + ')';
                              cmdlength = %len(%trim(cmdstring));
                              monitor;
                               $command(cmdstring : cmdlength);
                              on-error;
                              endmon;
              
              
                             select;
                              when workingLabel = 'BRC01';
                               BRC01 = QueueData;
                              when workingLabel = 'BRC02';
                               BRC02 = QueueData;
                             endsl;
              
                        // call tlashford print API
                              exsr $print;
              
                          cmdstring = 'dltovr BCLABELS';
                          cmdlength = %len(%trim(cmdstring));
              
                          monitor;
                           $command(cmdstring : cmdlength);
                          on-error;
                          endmon;
              
                            enddo;
              
                              *inlr = *on;
              
                      //-------------------------------------------------
                      // $print - print the labels
                      //-------------------------------------------------
                          begsr $print;
              
              
                          $printlabels(WorkingLabel :
                                       1            :
                                       workingoutq  :
                                       workingQty   :
                                       'Y'          :
                                       QueueData    :
                                       1            );
              
                          endsr;
              
                    /end-free
              All my answers were extracted from the "Big Dummy's Guide to the As400"
              and I take no responsibility for any of them.

              www.code400.com

              Comment

              Working...
              X