Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Posts
    122
    Thanks
    7
    Thanked 0 Times in 0 Posts

    How to Output a Formatted ASCII File (A2K SP2)

    I need to create a text file consisting of a number of fixed length records (with different formats) followed by a carriage return OR a line feed but not both. I have a routine that creates the required file using Output statements but each record is followed by both a carriage return and line feed. Is there an alternative way of creating the required records with only a carriage return or line feed?

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: How to Output a Formatted ASCII File (A2K SP2)

    You need to lookup the "Put" statement in Help. This should do what you want.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How to Output a Formatted ASCII File (A2K SP2)

    "With different formats"?? ASCII text files don't *have* formats, by definition. Fixed length files don't ordinarily have carriage returns and line feeds. The end of a record is determined by the specification.
    Charlotte

  4. #4
    2 Star Lounger
    Join Date
    Apr 2001
    Posts
    122
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Re: How to Output a Formatted ASCII File (A2K SP2)

    Thanks, that is exactly what I needed. I have never had the occasion to use the Put command before.

  5. #5
    2 Star Lounger
    Join Date
    Apr 2001
    Posts
    122
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Re: How to Output a Formatted ASCII File (A2K SP2)

    In this instance (Electronic Data Interchange or EDI) there are many record layouts in a batch transmission file. The records are defined to be 320 characters with a carriage return and/or line feed. Each record type has a different "format" consisting of a few to dozens of fields that maybe numeric or character.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •