PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 04/01/2016 11:52 AM by  jaherb
Extract File Issues
 14 Replies
Sort:
You are not authorized to post a reply.
Page 1 of 3123 > >>
Author Messages
jaherb
Independent
Independent
Veteran Member
(472 points)
Veteran Member
Posts:164


Send Message:

--
03/09/2016 3:32 PM

    I am not sure why I am not seeing the issue with a simple extract program... but I am at a loss at this point.   

    We have an extract file being produced as a 250 byte fixed length file.   There are 3 record types... a typical Header, Detail and Trailer record.  Each record must be delimited by  CR/LF characters.

    The logic writes the records to an intermediate sequential file and then at the end of the job it is reformatted by a cnvexp -f  filename  250  command to append the CR/LF characters at the end of each line.   This is all working fine and the issue comes when the bank complains about the file having a blank line after the trailer record.  

    In looking at the extract record, the only place this occurs at is following the trailer record.   You can see this on the screen image below.   I would expect to see the "0D0A" as the last character and nothing following that.   Whatever that character is, it is position 251 of that record, so it appears this one position is being carried over to the next line, which should not exist.   The work def has all files set at 250 bytes.

    Anyone have any ideas?

     

     

    Here is another view of the extract file using the Unix hd command

     

     

    JimY
    Private
    Private
    Veteran Member
    (1237 points)
    Veteran Member
    Posts:443


    Send Message:

    --
    03/14/2016 1:20 PM
    Our bank also complained to me about that. I had to remove the CRLF at the end of the last line. What type of program are you using to generate the file. You will probably have to run it through a script to remove the the CRLF from the last line.
    pbelsky
    Corporate Applications Analyst
    Green Bay Packaging
    Veteran Member
    (230 points)
    Veteran Member
    Posts:80


    Send Message:

    --
    03/14/2016 1:42 PM

    i have run into this with several vendors over the years. We also had to run the file through a script to remove that last line.

    jaherb
    Independent
    Independent
    Veteran Member
    (472 points)
    Veteran Member
    Posts:164


    Send Message:

    --
    03/15/2016 11:19 AM
    Thanks for the reply. I am waiting on the vendor to forward me detailed extract specifications including the addition or deletion of CR/LF characters. This is where I think it may be off at. The odd part is that they say the file is good sometimes and bad at other times
    jaherb
    Independent
    Independent
    Veteran Member
    (472 points)
    Veteran Member
    Posts:164


    Send Message:

    --
    03/15/2016 4:59 PM
    pbelskky.....

    Can you paste the script that you are using to remove the last line? I have been trying all types of sed commands, but cannot find the correct combination.

    Thank you..

    Jim
    You are not authorized to post a reply.
    Page 1 of 3123 > >>