Use the DALRUN and DALVAR built-in functions to execute DAL scripts or get DAL variable information you can use to complete INI options. For instance, you can use this to map unique recipient information into batch records.
These functions are automatically registered when DAL is initialized. Several programs can initialize DAL, such as the GenData and GenPrint programs, the AFEMAIN program (including RACLIB/RACCO), Documaker Studio, and various utilities such as ARCRET, ARCSPLIT, and DALRUN.
Note | If you try to use these functions in systems that do not initialize DAL, an incorrect INI value is returned. |
Here is an example:
< INIGroup >
Option1 = ~DALRUN MY.DAL
Option2 = ~DALVAR XYZ_VAL
If the program requests Option1, the script MY.DAL is executed and the resulting option is assigned.
If the program requests Option2, the DAL variable XYZ_VAL is located and its contents are assigned to the INI option.
Using this function with the GenPrint program to initialize INI options can produce errors. At the point in the GenPrint program that INI files are loaded, the system may not have processed enough information to use some DAL functions in the script executed by this function. Here is an example:
< PDFNames >
Archive = c:..\Output\~GetEnv ExtrFileName ~DALRUN Archive_Name
< Printer2 >
Port = <PDFNames> Archive =
Here is the problem statement from the DAL script (ARCHIVE_NAME.DAL):
f_name = "_" & GVM("RunDate") & "_A" & newcount & "_" & GVM("PolicyNumber")
Instead you will receive an error message similar to the following.
DM12041: Error : FAP library error: Transaction:<>,
area:<..\C\genbannr.c,Jun 23 2004
20:14:14,400.110.002,GENDALErrorNotify>
code1:<0>, code2:<0>
msg:<Script: c:..\Deflib\Archive_Name.dal
Line: 6 Col: 33 Err: 15 Token: )
Msg: No result value returned>.
In this example, the GVM values, RunDate and PolicyNumber have not been loaded.
© Copyright 2014, Oracle and/or its affiliates. All rights reserved. Legal notices.