AS/400-to-Excel downloading
Pickering, John (NORBORD)
PICKERIJ@norbord.com
Fri, 12 Jul 2002 10:23:34 -0400
Just me being picky again, but why 2 requests?
How about doing it in one request. Write the headings out "at initial" and
append the data.
access detail_file
subfile subfile_name alias subfile_headings at intitial include &
<same item list>
item field_a of subfile_headings final "Head A"
item field_b of subfile_headings final "Head B"
subfile subfile_name alias subfile_detail append include &
<same item list>
Glad it's Friday,
JWP
> -----Original Message-----
> From: SAWYER, Anthony [SMTP:tony.sawyer@mfi.co.uk]
> Sent: Friday, July 12, 2002 10:12 AM
> To: 'Pickering, John (NORBORD)'; 'Bruce Schuck'; 'David Morrison -
> Corporate'; powerh-l@lists.swau.edu
> Subject: RE: AS/400-to-Excel downloading
>
> We managed to get around the 255 limit by using QTP to create a
> 'nodictionary' subfile (.DAT)
>
> You have to include a carriage return at the end of each record otherwise
> Excel will read it as one immense line though
>
> You can create a heading line in one request and append data to it in the
> next. We use global temporaries to hold the delimiters to prevent having
> to
> recalculate it every time
>
> On compiling it throws up countless duplicate field name warnings for the
> delimiters (we are using a semi colon below in g_separator), but these can
> be ignored in this case.
>
> I'm not certain that the method for getting the carriage return works for
> the AS/400 though - this might need a little work...
>
> HTH, Regards
>
> Tony
>
>
> e.g. (VMS, 8.20D)
>
> run one
>
> glo tem g_separator char*1 init ";"
> glo tem g_num int*2 init 13
> glo tem g_cr char*1 init ascii(g_num)[2:1]
>
> req one
>
> access small_file
>
> temp field_a char*20
> temp field_b char*20
> temp field_c char*20
>
> item field_a = "Heading 1"
> item field_b = "Heading 2"
> item field_c = "Heading 3"
>
> subfile subfile_name keep nodict at final include &
> field_a, &
> g_separator, &
> field_b, &
> g_separator, &
> field_c, &
> g_cr
>
> req two
>
> access detail_file
>
> subfile subfile_name keep append nodict include &
> field_a, &
> g_separator, &
> field_b, &
> g_separator, &
> field_c, &
> g_cr
>
> bui qtp_file
>
>