ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Bar Codes

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

  • Bar Codes

    Hi Everyone,

    I need to produce a bar code that would host two leading zeros, a third character is an indicator that when is 0, would indicate that are more pages to be printed and when its 1 it would indicate end of print for this document. The last two characters would indicate only the odd page numbers (the printed pages will be double sided print). I need to prepare the barcode along with other data and write into a data base file. The data base file is then sent to a Z90 where it gets printed and the documnt get filed into envelopes. I don't have a clue about bar codes. They only info I posses to form the barcode are is the number of pages that are to printed and the handling of the indicator print. The barcode output would be: 0 0 0 0 1, 0 0 1 0 3 when printing three page statements.

    Thank you.

    Emmanuel

  • #2
    Re: Bar Codes

    What type of bar code will it accept?

    Then using a printer file , you have a filed that has the BARCODE http://publib.boulder.ibm.com/infoce...mstptbarco.htm

    Other resources too. The printer must be an *IPDS printer.

    It is just that simple.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Re: Bar Codes

      Barcode128

      Comment


      • #4
        Re: Bar Codes

        So now make a PRTF that has the BARCODE keyword and BARCODE128. Load the field with your rules above. compile, run, print, raise a beer to me.
        Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

        Comment


        • #5
          Re: Bar Codes

          Originally posted by zannise
          I need to prepare the barcode along with other data and write into a data base file. The data base file is then sent to a Z90 where it gets printed...
          Since "barcode" isn't exactly a data type, do you have any clues how the database file field will be defined? Do you have an example of data that would go into that field?

          Is there a reason you need to send a database file to a z90 rather than just generating the printer output on your iSeries and sending that to the z90?
          Tom

          There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

          Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

          Comment


          • #6
            Re: Bar Codes

            I assume that rather than "BARCODE128" (whatever that is?) you actually mean the Code 128 barcode symbology. Barcodes printed with Code 128 actually have their own special character set, so the character field would need some particular formatting before you can print it. Details of this can be found here:

            The syntax of the BARCODE DDS keyword:


            The Code 128 character set:


            Of course, all of this assumes that you are using the DDS BARCODE keyword to print the barcode. If you're using another method, such as a thermal printer, or different software on a different machine, all bets are off. I'm not certain what a "Z90" is, so not sure how that might affect my answer.

            I personally would not keep the data in the database in any particular way. Rather, I would have a routine that reads "normal" data from a database, and formats it for printing immediately before sending it to the printer. This way, it's formatted in a manner that's most suitable to a database when it's in the database, and in the way most suitable to the printer when it's sent to the printer.

            Not sure if any of that is helpful... ?

            Comment


            • #7
              Re: Bar Codes

              Hi Scott,

              The reason they are using data base is because all printing occurs on the company mainframe Z90. Through my reading yesterday about bar codes I realised that Code 128 uses its own special codes. Realising my case Code 128 want do for my case. So I am keep looking fo a solution.

              Comment


              • #8
                Re: Bar Codes

                Hi Tom,

                The file consitst of three key fields and field, 250 long where all the narrative of the statements are entered. The barcode will be an additional file which will be handled at the other side. Here's an example ACTIVE DEACTIVE FLD2 FLD3
                1 4 7262838
                1 4 0724398
                1 4 100,00
                1 0 >726283807243984< 100008> 180711< 24>
                1 9
                My Code will be another line i.e. X X bar code value (double dutch characters of course).

                All statement and printed in the mainframe Z90.

                Comment


                • #9
                  Re: Bar Codes

                  I created a prtf yesterday based on a example I found in code 400. I used the keyword barcode (barcode in the example code3of9) in my printer file. Created the printer file as afpds (as the example). Wrote an rpg program with some test data. During the program I printed the test data and updated the data base file field with the value of the print field. When I looked at the database file the result was in EBDIC and not converted as I was expecting.

                  Comment


                  • #10
                    Re: Bar Codes

                    Originally posted by zannise View Post
                    When I looked at the database file the result was in EBDIC and not converted as I was expecting.
                    "Converted"?

                    Converted to what? ("Double Dutch"? What is "Double Dutch" in this context?) Are you needing it as hexadecimal characters? Was the EBCDIC value correct if you converted it manually?

                    Can you show an actual physical example?
                    Tom

                    There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                    Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                    Comment


                    • #11
                      Re: Bar Codes

                      By double dutch I mean to hex value. By using the printer file keyword barcode I was expecting that the value would have been converted and this way I would be able to default the converted value to my database field string.

                      Comment


                      • #12
                        Re: Bar Codes

                        Technically, if your field contains the appropriate EBCDIC representation of the value, then the "hex" is already there. However, if you need it represented as hex characters, it's pretty easy to do. Are you programming in RPG? (ILE RPG)
                        Tom

                        There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                        Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                        Comment


                        • #13
                          Re: Bar Codes

                          I am programmning in RPG. I was told the barcode to use is code3of9. The info I gathered so far is that Code3of9 uses ascii codes. So it seems I will need to convert my ebcdic to ascii in order to make it work.

                          Comment


                          • #14
                            Re: Bar Codes

                            Straight EBCDIC to ASCII? Or is the hex character representation of ASCII? Also, are you generating many of these each time? Or do you just generate one and then send one?
                            Tom

                            There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                            Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                            Comment


                            • #15
                              Re: Bar Codes

                              It seems that the Code3of9 start with a start and end with a star. So the stars and the number between them will need to be coverted from EBCDIC hex to ASCII hex representation of that character. As it is only numbers I will concentrate on just that.

                              It will be generated once a user request to print a statement.

                              Comment

                              Working...
                              X