Use spooled file attributes in the designer

Use spooled file attributes in the designer

You can use a lot of spooled file attributes, when you create a template in the designer.

You can e.g. use spooled file attributes in the designer in multiple way: Inside conditions or e.g. simply include them in a text element.

You can refer to spooled file attributes in two ways:

1.Refer to predefined workflow variables, that contains the spooled file attributes.

2.Refer to the attributes directly in the designer. 

The second option is recommended.


Refer to predefined workflow variables for the attributes

One way to use spooled file attributes in the designer is to use the predefined workflow variables, that contains the spooled file attributes. There are two downsides with this:

1.You cannot see the variable names directly in the designer, but you need to copy the variable names from either a workflow, that is setup to monitor an output queue on the IBM i platform, or you need to copy the variable name from this list.

2.You cannot directly see the right value of any spooled file attribute in the designer. Instead you need to define the same variable as a workflow variable in the top of your template and here manually set a value, that represents the setup, that you want to use in the designer session.

The advantage is, that you can use the same variables, that you can use the workflow.

 

 

Refer to the attributes directly in the designer

If you have loaded a spooled file as the input document in the designer, then you have directly access to the attributes of the spooled file, if you insert an XPath function in any of the design elements.

 

You can e.g. insert an XPath expression in a Text element, if you click the Expression option on the top and then the magnifying glass on the left:

 

NG2DesignerSplfAttributes0001

 

Now you have an extra tab in the top (compared to non-spooled files), that is called Attributes:

 

NG2DesignerSplfAttributes0002

 

 

Here you can simply click the attribute, that you want to refer to. If you e.g. select the User data (USRDTA) field, then this will be inserted:

 

//@userData

 

The complete list of the spooled file attributes is included below (in alphanumeric order):

 

//@copies

The copies attribute of the input spooled file. The spooled file will be printed this number of times.

//@created

Timestamp of when the spooled file was created.

//@crtDate

The date when the spooled file was created

//@devFile

The printer file (device file), that was used when the spooled file was created.

//@devLib

The library of the printer file (device file), that was used when the spooled file was created.

//@endPage

The last page to be printed - as specified via PAGERANGE.

//@formtype

The form type (FORMTYPE) of the input spooled file. This is very often *STD.

//@jobName

The name of the job, that created the spooled file.

//@jobNbr

The job number of the job, that created the spooled file.

//@outq

The output queue in which the spooled file is placed.

//@outqLib

The library of the output queue in which the spooled file is placed.

//@pageLength

The maximum number of spooled file lines per page.

//@pageWidth

The maximum number of spooled file positions on a spooled line.

//@pgm

The program, that created the spooled file.

//@pgmLib

The library of the program, that created the spooled file.

//@splf

The spooled file name.

//@splfNbr

The spooled file number.

//@startPage

The first page to be printed - as specified via PAGERANGE.

//@system

The system name of the IBM i, where the spooled file was created.

//@totalPages

The total number of pages in the spooled file.

//@user

The user, that created the spooled file.

//@userData

The user data field (USRDTA) of the spooled file. (10 characters long)

//@usrDefData

The user defined data field (USRDFNDTA) of the spooled file. (255 characters long)


    • Related Articles

    • Change spooled file attributes

      As a part of the processing of an input spooled file in the workflow, you might want to change one or more spooled file attributes e.g. to inform the end users, that the input spooled file has been processed successfully in InterFormNG2. To change ...
    • Condition workflow on spooled file attributes

      When you build a workflow tree structure to handle all the different types of spooled files, then you normally need to look at the spooled file attributes (e.g. spooled file name) apart from the spooled file contents to identify the spooled file type ...
    • Use the page range of an input spooled file

      This section covers solutions of how you can use the page range of an input spooled file in order to only process a sub section of a spooled file specified on the PAGERANGE parameter as a from and to page number. These scenarios are covered below: 1) ...
    • Change attributes of spooled file

      As a part of spooled file processing in InterFormNG2 on the IBM i platform, you might want to change one or more spooled file attributes of the input spooled file to let the end user know, that the specific spooled file has been successfully ...
    • Spooled files in the designer

      You can process spooled files in InterFormNG2, if you have installed InterFormNG2 on the IBM i platform. The spooled file actions related to the designer are: •How to load a spooled file in the designer. •How to map spooled file data in the designer. ...