Skip to Content
author's profile photo Former Member
Former Member

Download data to Fixed Length Text File

Can anyone share the sample code on how to download data into fixed length text file and place the file in the server directory?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 17, 2008 at 06:58 AM

    Hi

    Try as below when transferring records to file in application server:

    TRANSFER <structure> TO <file> LENGTH <len>. 
    

    Kind Regards

    Eswar

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      One way i would advice is to declare a text variable and move values using offset.

      Eg:
        move: <struc>-fld1 to l_text(8),
              <struc>-fld2 to l_text+8(3),
              <struc>-fld3 to l_text+11(15).
        transfer l_text to <file>.
      

      Try this approch and see the result.

      Kind Regards

      Eswar

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.