KB Article #69275

Variables not being set on first transfer after restart

Problem

The &SYSDATE and &SYSTIME variables do not get set when used in a NFNAME field from a CFTUTIL send command?



cftutil send part=my_partner, idf=my_idf, NFNAME= '&FROOT.&SYSDATE-&SYSTIME'


Resolution

At time of the send command, system variables set in the NFNAME are treated as plain text (as it is at that level for CFT variables as well)
Variables are resolved latter on, when the file name is going to be allocated.
Using the CFTRECV template sets with those variables is fine and works just as expected, when the file allocation attempt is done by CFT, system variables are then resolved (by the system)



If the needs are really to have system variables resolved within parameters of a cftutil SEND command, it can be done when the cftutil is used along file indirection or within a shell script.



Example:
The following command issued from a shell script will be submitted to CFT with system variable resolved:



#!/usr/bin/sh



CFTUTIL << EOF
send part=paris,idf=open,nfname=DATE_&SYSDATE
exit
EOF
#end