10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Now you can compile your program using the CRTBNDRPG command (or option 14 inPDM):CRTBNDRPG PGM(PDFLIB/HELLO) SRCFILE(PDFLIB/QRPGLESRC) SRCMBR(*PGM) DFTACTGRP(*NO)BNDDIR(PDFLIB/PDFLIB)Error Handling in RPG. PDFlib clients written in ILE-RPG can use the monitor/on-error/endmon error handling mechanism that ILE-RPG provides. Another way to monitor forexceptions is to use the *PSSR global error handling subroutine in ILE-RPG. If an exceptionoccurs, the job log shows the error number, the function that failed and the reasonfor the exception. PDFlib sends an escape message to the calling program.c eval p=PDF_new*c monitor*c eval doc=PDF_begin_document(p:%ucs2(’/tmp/my.pdf’):docoptlist)::* Error Handlingc on-error* Do something with this error* don’t forget to free the PDFlib objectc callp PDF_delete(p)c endmon42 Chapter 2: PDFlib Language Bindings

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!