Show TOC

Syntax documentation*PUT Locate this document in the navigation structure

Allowed uses: By Commit, MDX, SQL

This instruction can be used to directly write values in a selected region. The syntax is:

*PUT({dimension}={member}[,{dimension}={member}]

[EXPRESSION={expression}….)

Example Example

*PUT(ACCOUNT=FLAG, INTCO=NONE, CURRENCY=LC, EXPRESSION=123)

End of the example.

This instruction writes the value 123 in account=flag, intco=none and currency=lc for all entities, categories and time periods passed in the selected region.

The instruction can be used to flag a region of data with a value indicating the status of the data. For example, whenever data is entered in a certain entity, the default logic could flag that entity as impacted. Later on, a currency conversion could be executed just for the impacted entities. At the end of its execution, the translation logic could de-impact these entities, by setting their flag account back to zero.

Important remarks:

The parameters can only take explicit values and cannot be derived from a dimension property (unless passing through a SELECT instruction).

The scope of the records to write is by default defined as all the members passed for the dimensions category, time, and entity. This default scope can be modified with the instruction *PUTSCOPE_BY, which is similar to the SCOPE_BY instruction, but is specific to the PUT instruction.

Example Example

*PUTSCOPE_BY=CATEGORY, TIME, DATASRC

End of the example.

The destination members must be specified for all dimensions. The dimensions defined in the scope derive the correct members from the passed region. All other dimensions must have one member specified in the PUT parameters or by a XDIM_MEMBERSET or similar instruction.

Example Example

*XDIM_MEMBERSET INTCO=NONE

*XDIM_MEMBERSET CURRENCY=LC

*PUT(ACCOUNT=FLAG, EXPRESSION=123)

End of the example.

The EXPRESSION parameter is optional. If omitted it defaults to 1. This example generates a value of 1 for account flag:

*PUT(ACCOUNT=FLAG)

Multiple PUT instructions can be specified in the same commit section.

Example Example

*XDIM_MEMBERSET INTCO=NONE

*XDIM_MEMBERSET ACCOUNT=FLAG

*PUT(CURRENCY=USD)

*PUT(CURRENCY=EURO)

End of the example.

The PUT instruction MUST be defined in a STANDALONE COMMIT section. It cannot be mixed with MDX formulas or with WHEN/ENDWHEN structures.

The PUT instruction always and automatically enforces a *calculate_difference=0. The PUT instruction supports the ability to write into an application different from the source. The following is a valid example of logic that runs from a RATE application and writes in the FINANCE application.

*destinationapp=finance

*skipdim=inputcurrency

*skipdim=rate *skipdim=entity2

*adddim intco=non_interco

*Adddim datasrc=%DATASRC% // this is needed if the datasrc is re-directed in the PUT

*Adddim account=flag

*adddim currency=lc

*adddim entity=dummy

*PUT(datasrc=input)

*PUT(datasrc=adjustment)