AP160 FORMAT - ONE LONG RECORD STRING

 8 Replies
 0 Subscribed to this topic
 43 Subscribed to this forum
Sort:
Author
Messages
JPurvis
Posts: 5
    We are attemping to setup a NACHA file format using AP160. Our file currently is outputting a file that puts the data in one long string. We wanted to get this type of format below.
    Basically the normal NACHA looking format....any help or thoughts? Where are we missing a flag or parameter to get the output to look like this?

    Thanks!

    1 data
    5 data
    8 data
    9 data
    Vicki
    Basic Member
    Posts: 10
    Basic Member
      Do you have the option of FORMAT = 'I' on the Output Options tab?
      JimY
      Veteran Member
      Posts: 510
      Veteran Member
        There was a patch for that, but you could change the ORGANIZATION to LINE-SEQUENTIAL for ACHTAPE-FILE to solve your problem. I can't seem to remember which patch it was.
        JPurvis
        Posts: 5
          Hi sorry, I only have P and C. I don't seem to have the format option of 'I'.
          JPurvis
          Posts: 5
            [quote]
            Posted By JimY on 10/04/2012 07:02 AM
            There was a patch for that, but you could change the ORGANIZATION to LINE-SEQUENTIAL for ACHTAPE-FILE to solve your problem. I can't seem to remember which patch it was.
            [/quote]
            Hi, I'm pretty much a rookie with Lawson. Where would I go to see the Organization to Line-Sequential for ACHTAPE-FILE setting? Which form etc?

            Thanks so much.
            MattK
            New Member
            Posts: 5
            New Member
              We had the same issue so decided to use an ETL tool to read the file and put it into format, and it works rather nicely. We have to tweak some of the data in the file anyway to conform to what the bank need.
              JimY
              Veteran Member
              Posts: 510
              Veteran Member
                Hi JPurvis,
                What I did is use the command bldsh which pulls all the source code together. It will place the program code in $LAWDIR/product_line/apsrc/. You can then find the select statement there. You cannot use the lawson compile scripts (qcompile,etc). I use the following:
                hurcob='cob32 -C nolist -vW e -C warning=1 -C noalter -C vsc2' AP160.cbl -u 


                You will then have to move the resulting generated member AP160.gnt to $LAWDIR/product_line/obj/.

                If you don't want to go through all this you could use the command cnvexp that will change a file from sequential to line sequential. you will have to know the length of the record. You could develop a script to do this and execute it after AP160 completes. Hope this helps.
                John Henley
                Posts: 3353
                  I recommend using a multi-step job created via jobdef. Step one runs the AP160, and then step two calls a script that includes the cnvexp command to post-process the file into the correct format.
                  Thanks for using the LawsonGuru.com forums!
                  John
                  JimY
                  Veteran Member
                  Posts: 510
                  Veteran Member
                    I agree John. I do that when I have to run scripts that process files that have been created by the previous step or when I want to send emails to notify that a program has completed. I created a cobol program using 4GL that I edited to call the script. It works great for me. Thank you.