set the path where a PDF file will be written

Using Acu 10.1.1 -- can anyone tell me how, if it is possible, to set the path where a PDF file will be written taking the decision out of the users control; example "C:\A2\Reports\pdffilename.pdf".  Any help would be greatly appreciated.  Thanks

  • In the SELECT clause you may use the full path name hardcoded or using a variable name; the pdf will be LINE SEQUENTIAL file type just like the csv's , xml, and sql files you generate in the acucobol.
  • Thanks for your help but what I am doing (below)

    select file-output
    assign to "C:\A2\Reports\PDFTest.PDF"
    organization is line sequential
    file status is printpdf-status.

    isn't working. When I try to open the file PDFTest with Adobe i get message 'could not open because not supported file type or because file has been damaged.

    Am I missing something?

    Any further suggestions would be greatly appreciated.

    Thanks.
  • select file-output assign to print -- then in the runtime configuration file
    file-output -P PDF "C:\A2\Reports\PDFTest.PDF"
  • Thanks for your help.

    What I got with your example is that the printer opened as PDF which is great.

    The save as dialog box still came up with the last path used and wanting a file name.

    I have multiple users creating multiple print documents several times a day. I need the program
    to dictate a different, unique file name each time.

    This is very easy writing a sequential (flat) file that can be opened with notepad as an example.

    Is there anyway this can be done?

    I have read everything I can find on this. It seems that years ago some people purchased
    a product "cutepdf.com/.../pdfwriter.asp".

    Others said "PDF995 - virtual printer" was the solution.

    If anyone has any advice I would very much appreciate it.

    Thank you in advance.
  • Hi JohnLeeM,
    I think you made a mistake in the namegiving of the PDF.
    If you define the print-file like this:
    select prn assign to print pdf-file-id
    organization line sequential
    access mode sequential
    lock mode exclusive
    file status prn-status.
    And in the working storage: 01 pdf-file-id pic x(150).
    In the Procedure you set something like:
    move "-p PDF T:\data\tstpdf\Test01.pdf" to pdf-file-id
    before you open the print-file, then you won't be prompted for a name.
    Be aware that you'll have to set the margins also and graphics cannot yet be used until Version 10.2
    Hope this helps.
    Best regards,
    Ruud
  • This worked! Thanks, really appreciate your help.