Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Outputing Form/Frame to a Disk File

Status
Not open for further replies.

ihda

MIS
Apr 6, 2001
46
0
0
US
My program executes, but no output is written to a disk file. Below is the main points of the program. I do not see what I'm doing wrong.

Thanks
Lar

Sample Code:


DEFINE VARIABLE OUTPUTNAME AS CHARACTER NO-UNDO.
DEFINE STREAM REPORT.


FORM SFAM.Z_IHDA_OUTSTANDING.VENDNAME FORMAT "X(10)" COLUMN-LABEL "Lender"
SFAM.Z_IHDA_OUTSTANDING.NAME FORMAT "X(10)" COLUMN-LABEL "Borrower"
SFAM.Z_IHDA_OUTSTANDING.LOANNUMBER FORMAT "X(10)" COLUMN-LABEL "Loan Number"
SFAM.Z_IHDA_OUTSTANDING.PKGINCCD FORMAT "X(10)" COLUMN-LABEL "Code"
SFAM.Z_IHDA_OUTSTANDING.PKGINCDESC[1] FORMAT "X(50)" COLUMN-LABEL "Reason"
WITH WIDTH 170 DOWN NO-BOX FRAME DTL1.

FOR EACH SFAM.Z_IHDA_OUTSTANDING BY SFAM.Z_IHDA_OUTSTANDING.VENDID:

OUTPUTNAME = "C:\MISSING_DOCS\VENDOR." + SFAM.Z_IHDA_OUTSTANDING.VENDID.
OUTPUT STREAM report TO OUTPUTNAME.

DISPLAY STREAM REPORT
SFAM.Z_IHDA_OUTSTANDING.VENDNAME
SFAM.Z_IHDA_OUTSTANDING.NAME
SFAM.Z_IHDA_OUTSTANDING.LOANNUMBER
SFAM.Z_IHDA_OUTSTANDING.PKGINCCD
SFAM.Z_IHDA_OUTSTANDING.PKGINCDESC[1]
WITH FRAME DTL1.
 
Have you used the command
Output to ...
to change your output from screen to file.

example
Output to "c:\temp\temp.file".
display "Look I wrote date to a text file".
output close. /* Will change output back to terminal*/

You can also output to value -variable- to allow for more than one file name.
 
Progress only allows 5 streams to be open at any one time. perhaps this is causing your problem.

You should really have an OUTPUT STREAM report CLOSE after your DISPLAY STREAM.

Regular Progress users would not use DISPLAy with STREAM. Better to use PUT STREAM and then your fields. PUT does not handle labels automatically so you'll need to code the labels as "Literals": Eg

PUT STREAM report
"Lender" AT 1
SFAM.Z_IHDA_OUTSTANDING.VENDNAME FORMAT "X(10)"
"Borrower" AT 20
SFAM.Z_IHDA_OUTSTANDING.NAME FORMAT "X(10)"
etc
etc
SKIP.

You can make the labels into headings by defining in a PAGE-TOP FORM.

If youb are experiencing thes eproblems you really need proper Progress training. Otherwise you'll continue to produce Mickey Mouse code.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top