8 Replies Latest reply: May 12, 2014 1:51 AM by 1187092 RSS

    Error with printing via .sh file

    1172812

      Hi all,

       

      We're currently learning Documaker and we were given an existing workspace to work with. In the workspace, there is a .sh file that when run should generate PDFs from an XML file. Upon runtime, the pdf generated is 0 bytes and thus cannot be opened. In the errfile.dat, the following error is found:

       

      ------------------------------------------------------------------------------

      GenData

      Transaction Error Report - System timestamp: wed apr 30 13:24:34 2014

      DM10292:  Error in <RULXMLExtract()>:  Unable to execute function <DXMLoadXMLRecs()>.

      DM13025:  Warning in RCBSendToErrBatch(): The transaction is being assigned to the error batch.

      DM10947:  Error in NoGenTrnTransactionProc(): Unable to execute function RULLoadXtrRecs(pRPS).

      DM12018:  Error in RPDoBaseFormsetRulesForward(): Unable to execute base rule <NoGenTrnTransactionProc>.

      DM12066: Error in RPProcessOneTransaction(): Unable to RPDoBaseFormsetRulesForward(pRPS, RP_PRE_PROC_A).

      DM12065:  Error in RPProcessTransactions(): Unable to RPProcessOneTransaction(pRPS). Processing will continue. See INI group:<GenDataStopOn> option:TransactionErrors.

      ==> Warning  count:    1

      ==> Error    count:    5

      End of Transaction Error Report - System timestamp: wed apr 30 13:24:34 2014

      Elapsed Time: 0 seconds

      ------------------------------------------------------------------------------

       

      What is wrong with our method? Thanks!

        • 1. Re: Error with printing via .sh file
          User9976634-Oracle

          It is hard to say without knowing more about the setup, but essentially this says that whatever extract data was loaded for the transaction could not be loaded as an XML file. This may mean that you have incorrect settings telling the system that the data file will be XML when it really isn't, or could mean that there's something invalid about the XML content itself.

          • 2. Re: Error with printing via .sh file
            1172812

            Hi!

             

            May I ask where in the settings I can find that the input should be an XML file? Is it in the < ImportFormats > on the ini file? Currently it has

             

            09                            = ;XM;XML Export;WXMW32->WXMExportXML

             

            Sorry for the bother and thanks!                   

            • 3. Re: Error with printing via .sh file
              User9976634-Oracle

              The answer depends upon whether your extract is an XML file or if you extract is a flat-file that just names the XML file you want to import. In either case, no, you would not be looking at that option that refers to WXMExportXML. (That option is related to Documaker Desktop exporting of XML.)

               

              First if your extract is your XML, you will probably have this option.

               

              < RUNMODE >

                  XMLExtract                           = Yes

               

              And if it is a standard type XML file, you probably have a key field defined something like this:

               

              < ExtractKeyField >

                  SearchMask                           = 1,<?xml

               

               

              You may have something like this in your AFGJOB.JDT (or equivalent) file.

              <Base Form Set Rules>

              ;NoGenTrnTransactionProc;2;single step;

              ;UseXMLExtract;2;;

               

              I'm pretty sure you do not have to have the UseXMLExtract rule if you are using the XMLExtract=Yes INI option. I've seen it both ways.

               

              Now, if your Extract is really just a flat-file that names the XML files for each transaction, you probably will use an AFGJOB rule like this:

               

              <Base Form Set Rules>

              ;NoGenTrnTransactionProc;2;required to combine gentrn/gendata into single step;

              ;ImportXMLFile;;SCH=12,XFILE- 18,35;

               

              My Extract for this example might look like this if I had 3 transactions. (Just an example, not meant to be the exact way to represent the extract.)

              TRANS 12345 XFILE-.\Input\Trans12345.XML

              TRANS 23456 XFILE-.\Input\Trans23456.XML

              TRANS 34567 XFILE-.\Input\Trans34567.XML

               

              SCH defines a search mask first followed by a space and then the data and length of the file name you want to pick up.

              If you have already mapped the data into some other transaction related GVM, you could also do something like this:

               

              ;ImportXMLFile; ;GVM=InputFileGVM;

              Where InputFileGVM is the name of a GVM where you mapped your XML file name.

               

              There may be other variations on how you could set this up, but I think these are probably the most common.?

              • 4. Re: Error with printing via .sh file
                1172812

                Hi!

                 

                Thanks for the reply and you are correct in stating that we have flat file (in this case a dat file) that contains something like

                 

                XML_FILE_INPUT /insert path here/xml_file.xml

                 

                at that location there is an XML file that has something like

                <?xml version="1.0" encoding="utf-8"?><DOCUMENT VERSION="11.5" TYPE="RPWIP" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

                <DOCSET NAME="">

                <KEY1 NAME="KEY1">key1</KEY1>

                <KEY2 NAME="KEY2">key12</KEY2>

                <TRANSACTIONID NAME="KEYID">keyID</TRANSACTIONID>

                ...

                <group>

                     <form name = "form">

                          <sheet>

                               <field name="name"></field>

                          </sheet>

                     </form>

                </group>

                 

                on running the .sh file, it outputs an XML file and the .BAT file correctly. The trouble is that the PDF has 0 bytes (thus empty). I have followed the instructions but still no proper PDF.

                What's the possible missing/incorrect setup component? Thanks to anyone who can help out!

                • 5. Re: Error with printing via .sh file
                  User9976634-Oracle

                  Okay, I may not have all the details, but I think you are saying that your extract is flat-file that lists the XML files for the individual transactions. The layout is something like:

                  XML_FILE_INPUT /path/xml_file1.xml

                  XML_FILE_INPUT /path/xml_file2.xml

                  XML_FILE_INPUT /path/xml_file3.xml

                   

                  In this case, I believe you would need to confirm these INI options.

                   

                  < ExtractKeyField >

                      SearchMask      = 1,XML_FILE_INPUT

                   

                  < RUNMODE >

                      XMLExtract           = Yes

                      XMLFileExtract      = Yes

                      XMLFileExtractName  = SCH=1,XML_FILE_INPUT 16,100

                   

                  I don't think you need any rules in the AFGJOB.JDT in this case as this is enough to tell the system that you want to search for and load the associated XML as your extract.

                   

                  Note that it will be important to have the offset in the SCH= line defined correctly. Based upon what you have shown, I think that is 16. I gave 100 as the length, but you can do longer if your file names are longer.  Also note that the paths must be correct based upon where you are running as your working directory. Having a slash at the beginning on a Windows platform means to go back to the root of the drive. If you mean to search from the current working directory, you may need a dot at the start - like: XML_FILE_INPUT ./path/xml_file1.xml.

                  • 6. Re: Error with printing via .sh file
                    1187092

                    We have followed the pointers given in this thread but are still encountering the same errors and output.

                     

                    With the content of our extract and XML file like the ones mentioned above, our ini files also contain the following options:

                    < RUNMODE >

                        CheckNextRecip                = No

                        ChkDstLenExceeded          = No

                        CompiledFAP                    = No

                        DownLoadFAP                  = No

                        LoadCordFAP                   = Yes

                        NAUNLOAD                     = Yes

                        XMLEXTRACT                  = Yes

                        XMLFileExtract                = Yes

                        XMLFileExtractName      = SCH=1,XML_FILE_INPUT 16,85

                    < ExtractKeyField >

                        SearchMask                   = 1,XML_FILE_INPUT

                    < TRN_FIELDS >

                        KEY1                             = !DOCUMENT/DOCSET/KEY1

                        KEY2                             = !DOCUMENT/DOCSET/KEY2

                        KEYID                            = !DOCUMENT/DOCSET/TRANSACTIONID

                    < TRN_FILE >

                        BinaryExt                          = N

                        MaxExtRecLen                  = 3000

                        TRNRECFMT                     = StatusCode,EventStatus,EventCode

                      XMLTrnFields                      = Yes

                    < XML_IMP_EXP >

                        AppendedExport                = Yes

                        Ext                                   = XML

                        Path                                 = /scratch/oracle/app/documaker12/ormb/import/

                        SuppressDlg                     = Yes

                    < XMLTags2GVM >

                        KEY1                          = KEY1,req

                        KEY2                          = KEY2,req

                        KEYID                         = transactionId,req

                     

                    our AFGJOB,JDT file has these rules:

                    <Base Form Set Rules>

                    ;NoGenTrnTransactionProc;;required to combine gentrn/gendata into single step;

                    ;XMLFileExtract;2;SCH=1,XML_FILE_INPUT 16,85;

                    ;BuildFormList;;;

                    /* ;ImportXMLFile;;SCH=1,XML_FILE_INPUT 16,85; */

                    ;RunTriggers;2;;

                    ;ResetOvFlw;2;;

                    ;UpdatePOLFile;2;;

                    /* ;ReSetDocSetNames;;;

                    /* ;LoadRcpTbl;;;

                    /* ;RunSetRcpTbl;;;

                    ;PrintFormset;2;required to combine gendata/genprint into single step;

                    /* ;RulSortFormSet;;; */

                    /*;WriteRCBFiles;;; */

                    ;WriteOutput;;;

                    ;WriteNaFile;;;

                    ;ProcessQueue;;PostPaginationQueue;

                    ;BatchingByRecipINI;;;

                    ;PaginateAndPropogate;;;

                    ;FormDescription;;;

                    ;CheckZeroFontID;;E;

                     

                    Could there be other reasons as to why the XML file could not be loaded/read?

                    We are running Documaker on a Linux server.

                    • 7. Re: Error with printing via .sh file
                      User9976634-Oracle

                      First, if you are using the INI options specified, then I don't think you want the XMLFileExtract rule in the AFGJOB. That is redundant and might cause a problem?

                      If you are still getting the first error that you showed in the original message this typically would mean that the XML could not be loaded and/or parsed. Perhaps it is not a valid XML file that you are pointing to due to some error in construction.

                       

                      You may need to state your version of Documaker and patch level. That might give someone a clue that allows them to offer a suggestion.

                       

                      Whenever I'm faced with something like this, I generally try to validate my assumptions. For instance, I might first change the first transaction to point to a non-existing file. Then when I run, I would expect to get an error about the missing file. If you get the same error as before, it either means you are not running what you think or it could mean that this is the problem at hand - that you are not pointing to a file that can be found.

                       

                      If the first step gives you the error of a missing file, then I would correct it and then try pointing to a simpler XML file - not the one you're currently trying to import. See whether that gives you the same error or a different one. Etc. Etc.

                       

                      You may be in a position where you really should contact Support. This forum is not the same as Oracle Support.

                      • 8. Re: Error with printing via .sh file
                        1187092

                        We are now able to generate PDFs, thank you very much for the help! Bringing up the idea of redundancy has led us to the solution to our problem. What worked for us is that we removed the INI options XMLEXTRACT, XMLFileExtract, XMLFileExtractName, and retained the XMLFileExtract rule in the AFGJOB.