This example imports the A_FILE.PDF file from the PDF_File directory. Using this file, the GenData program adds the PDF images contained in the single PDF file to the form set. Each image in the PDF file causes a duplicate of the original FAP image to be appended to the form. This duplicate contains the bitmap image.
Keep in mind that if the OPT option is set to No, which is the default, the system expects you to provide a file name, otherwise you get an error.
If you set the OPT option to Yes, this tells the system that if the data for the file name is not provided it should skip to the next rule without creating an error message. Setting OPT to Yes simply tells the system that if no file name is provided, regardless of the mapping method you are using, it should not be considered an error.
You get no error if the PDF record does not exist in the extract file or if there is PDF record but as offset 10 for 25 bytes, there is nothing but spaces. If the OPT(Y) option is omitted, you get one of these messages, depending on your situation:
SRCH() A record matching the search mask <1,PDFF> could not be
located.
SRCH() Filename location within search record <1,PDF> is blank.
Offset <10,> Length <25>.
Here is an example:
AddMultiPageBitmap OPT(Y), GVM(PDF_GVM)
If PDF_GVM contains no data and the OPT(Y) option is specified, you get no error. If the OPT(Y) option is omitted, the system generates an error similar to this one:
GVM(<PDF_GVM>) Global variable does not exist or is empty.
Here is another example:
AddMultiPageBitmap OPT(Y), DAL(AddPDF.dal)
If processing the AddPDF.dal script results in an empty string and the OPT(Y) option is specified, you get no error. If the OPT(Y) option is omitted, the system generates an error similar to this one:
DAL(<AddPDF.dal>) script returned no result or result was blank.
Note | Remember that if no data exists and the OPT option is set to Yes, no error message appears. |
© Copyright 2012, Oracle and/or its affiliates. All rights reserved. Legal notices.