Re-formating checks from the "checks" print file

Sort:
You are not authorized to post a reply.
Author
Messages
wilcoxmad
Veteran Member
Posts: 87
Veteran Member

    How can I change the "checks" print file, output of PR160, into a fixed length file that a cobol program can read?

    John Henley
    Senior Member
    Posts: 3348
    Senior Member
      Re: Reformatting checks from the "checks" print file (6df0a8bc-9a15-4946-a099-d17ca57304f2) <!-- Converted from text/plain format -->

      You might be better off using the PR160 PMTOUT "laser" file instead--it's a flat file already ...

      Thanks for using the LawsonGuru.com forums!
      John
      wilcoxmad
      Veteran Member
      Posts: 87
      Veteran Member

        John,

        yea, we are going to do that once we convert to 9.0. Right now, the powers that be have decided they want to get this done ASAP.  We currently ftp the print file to an AS400 and manipulate it there.

        I have taken that cobol program, from the AS400, and converted it to work in Lawson on a unix box. Now the new cobol program wont read the file correctly. When I look at it in LED it looks fine. With vi it looks like variable lenght records, which is how the cobol program sees it too.

        Thanks.

        pookey
        Veteran Member
        Posts: 330
        Veteran Member
          Not sure if this is your issue, but there are 2 KB articles 71213 and 557467 on Lawson's support site with instuctions on how to change the file to a fixed length of 94.  Good luck!!
          Sam Simpson
          Veteran Member
          Posts: 239
          Veteran Member
            Correct me if I'm wrong but the CHECK file in 803 is already a fixed 132 characters. In your cobol program just reference the file as a 132 length. If your field does not totals 132 then just put a filler to make it 132. Actually it really does not matter what the length is. Since it is a flat file you can just the cobol verb READ. example..

            READ CHECKS-FILE INTO WS-CHECKS-FILE
            AT END
            MOVE WS-TRUE TO CHECKS-END-OF-FILE.


            Just as John has stated, I've used PMTOUT as input to our check print program from MCH.
            John Henley
            Senior Member
            Posts: 3348
            Senior Member
              Posted By stephanie on 10/01/2008 4:43 AM
              Not sure if this is your issue, but there are 2 KB articles 71213 and 557467 on Lawson's support site with instuctions on how to change the file to a fixed length of 94.  Good luck!!
              He is referring to the report file, not the ACH/TAPE file, which is the subject of those KB articles.
              Thanks for using the LawsonGuru.com forums!
              John
              John Henley
              Senior Member
              Posts: 3348
              Senior Member
                Posted By Sam Simpson on 10/01/2008 10:21 AM
                Correct me if I'm wrong but the CHECK file in 803 is already a fixed 132 characters. In your cobol program just reference the file as a 132 length. If your field does not totals 132 then just put a filler to make it 132.
                COBOL handles variable length records differently on some platforms than for others. For example, on some platforms, shorter records include data from the previous longer records. Is that what you're seeing?
                Thanks for using the LawsonGuru.com forums!
                John
                John Henley
                Senior Member
                Posts: 3348
                Senior Member
                  Posted By Sam Simpson on 10/01/2008 10:21 AM
                  Correct me if I'm wrong but the CHECK file in 803 is already a fixed 132 characters. In your cobol program just reference the file as a 132 length. If your field does not totals 132 then just put a filler to make it 132.
                  COBOL handles variable length records differently on some platforms than for others. For example, on some platforms, shorter records include data from the previous longer records. Is that what you're seeing?
                  Thanks for using the LawsonGuru.com forums!
                  John
                  wilcoxmad
                  Veteran Member
                  Posts: 87
                  Veteran Member
                    Thanks all for you comments. I was able to convert the print file to a CSV, which added a quote to the first and last character of each record. I then defined my input file, in the COBOL program, as a csv and modified the attributes of the file and set the "Field Seperator" to "none".

                    You are not authorized to post a reply.