DTS output to fixed field text file header line

  • I've been struggling with this and would appreciate any feedback. I need to export from SqlServer to a fixed field length text file (IBM card record format) for a JCL import on a mainframe.

    The problem is the first line in the output file must be non-table data. It contains some control data, including the number of data records to follow. How can I go about creating and exporting that first line, then exporting the actual data?

    Should I do this by determining the rowcount first, then creating the text file, then use a second DTS step to "append" to the text file the actual data ?

    Any help appreciated,

    Jim Ryan

  • This was removed by the editor as SPAM

  • Why not create a staging table with a single column say char(80). Insert the formatted header details first then extract and format the data then DTS this table to your text file.

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply