Warning when using environment variable in transformer stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sanoojk
Participant
Posts: 36
Joined: Wed Dec 19, 2007 3:54 am

Warning when using environment variable in transformer stage

Post by sanoojk »

I am getting the following warning during compilation when using a user defined environment variable in transformer stage in a parallel job.When the environment variable is removed and passed the value of environment variable by hard coding,no warning appears.can anyone provide me a solution for this.


warning:

Output from transformer compilation follows:

##I IIS-DSEE-TFCN-00001 03:50:09(000) <main_program>
IBM WebSphere DataStage Enterprise Edition 8.0.1.4665
Copyright (c) 2001, 2005-2007 IBM Corporation. All rights reserved



##I IIS-DSEE-TUTL-00031 03:50:09(001) <main_program> The open files limit is 2000; raising to 2147483647.
##I IIS-DSEE-TOSH-00002 03:50:09(002) <main_program> orchgeneral: loaded
##I IIS-DSEE-TOSH-00002 03:50:09(003) <main_program> orchsort: loaded
##I IIS-DSEE-TOSH-00002 03:50:09(004) <main_program> orchstats: loaded
##W IIS-DSEE-TOSH-00049 03:50:09(007) <main_program> Parameter specified but not used in flow: DSPXWorkingDir
##W IIS-DSEE-TFTM-00012 03:50:09(009) <transform> Error when checking composite operator: The number of reject datasets "0" is less than the number of input datasets "1".
##E IIS-DSEE-TFTK-00001 03:50:09(010) <transform> Error when checking composite operator: Unexpected tokens: ; [line 13,character 8].
##E IIS-DSEE-TFPS-00012 03:50:09(011) <transform> Error when checking composite operator: Invalid local variable declaration: ; [line 13, character 8].
##E IIS-DSEE-TFTK-00001 03:50:09(012) <transform> Error when checking composite operator: Unexpected tokens: ; [line 46,character 26].
##E IIS-DSEE-TFPS-00027 03:50:09(013) <transform> Error when checking composite operator: Expected an operand; [line 46, character 24].
##E IIS-DSEE-TFPS-00038 03:50:09(014) <transform> Error when checking composite operator: Expected semi-colon; [line 46, character 26].
##E IIS-DSEE-TFSR-00019 03:50:09(015) <main_program> Could not check all operators because of previous error(s)
##E IIS-DSEE-TCOS-00029 03:50:09(016) <main_program> Creation of a step finished with status = FAILED. (STG_SOR_LD_ASN_LN.Transformer_62)

*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S62_STG_SOR_LD_ASN_LN_Transformer_62 transform operator.
0003: //
0004:
0005: // define our input/output link names
0006: inputname 0 Lnk_Join_Tfr_ASN_LN;
0007: outputname 0 Insert;
0008: outputname 1 Update;
0009: outputname 2 Exception;
0010:
0011: global {
0012: // Job parameter declaration
0013: ustring $evUsID;
0014: ustring DSJobController;
0015: ustring DSJobStartTimestamp;
0016: }
0017:
0018: initialize {
0019: // define our row rejected variable
0020: int8 RowRejected0;
0021:
0022: // define our null set variable
0023: int8 NullSetVar0;
0024:
0025: // declare our intermediate variables for this section
0026: string InterVar0_0;
0027:
0028: // initialise constant values which require conversion
0029: InterVar0_0 = "DSUSER";
0030: // Stage variable declaration and initialisation
0031: string StageVar0_StageVar;
0032: StageVar0_StageVar = "";
0033: string StageVar0_StgSurrKey;
0034: StageVar0_StgSurrKey = "";
0035: string StageVar0_Stgupdatedby;
0036: StageVar0_Stgupdatedby = InterVar0_0;
0037: }
0038:
0039: mainloop {
0040: // initialise our row rejected variable
0041: RowRejected0 = 1;
0042:
0043: // evaluate the stage variables first
0044: StageVar0_StageVar = DSJobController;
0045: StageVar0_StgSurrKey = surrogatekey_generate();
0046: StageVar0_Stgupdatedby = $evUsID;
0047:
0048: // evaluate constraint and columns for link: Insert
0049: if ((Lnk_Join_Tfr_ASN_LN.NEW_ASN_FLAG == 1))
0050: {
0051: Insert.SHPD_QTY = Lnk_Join_Tfr_ASN_LN.SRC_SHIPPED_QTY;
0052: Insert.ITM_ID = Lnk_Join_Tfr_ASN_LN.PROD_ID;
0053: Insert.TPRT_ID = Lnk_Join_Tfr_ASN_LN.TRPT_ID;
0054: Insert.SPLT_LOT_NBR = Lnk_Join_Tfr_ASN_LN.SRC_SUPPLIER_LOT_NUMBER;
0055: Insert.SHPM_DT = Lnk_Join_Tfr_ASN_LN.SRC_SHIPMENT_DATE;
0056: Insert.ASN_ID = StageVar0_StgSurrKey;
0057: Insert.CONFR_DLV_DT = Lnk_Join_Tfr_ASN_LN.SRC_CONFIRMED_DELV_DATE;
0058: Insert.ASN_LN_NBR = Lnk_Join_Tfr_ASN_LN.SRC_ASN_LN_NBR;
0059: Insert.SHPD_QTY_UOM_ID = Lnk_Join_Tfr_ASN_LN.QTY_UOM_ID;
0060: Insert.SRC_SYSTEM_ID = Lnk_Join_Tfr_ASN_LN.SRC_SRC_SYS_ID;
0061: Insert.CREATE_DATE = current_timestamp();
0062: Insert.CREATED_BY = StageVar0_Stgupdatedby;
0063: Insert.LAST_UPDATE_DATE = timestamp_from_ustring(DSJobStartTimestamp);
0064: Insert.UPDATED_BY = StageVar0_Stgupdatedby;
0065: writerecord 0;
0066: RowRejected0 = 0;
0067: }
0068: // evaluate constraint and columns for link: Update
0069: if ((Lnk_Join_Tfr_ASN_LN.NEW_ASN_FLAG == 0))
0070: {
0071: Update.SHPD_QTY = Lnk_Join_Tfr_ASN_LN.SRC_SHIPPED_QTY;
0072: Update.ITM_ID = Lnk_Join_Tfr_ASN_LN.PROD_ID;
0073: Update.TPRT_ID = Lnk_Join_Tfr_ASN_LN.TRPT_ID;
0074: Update.SPLT_LOT_NBR = Lnk_Join_Tfr_ASN_LN.SRC_SUPPLIER_LOT_NUMBER;
0075: Update.SHPM_DT = Lnk_Join_Tfr_ASN_LN.SRC_SHIPMENT_DATE;
0076: Update.ASN_ID = Lnk_Join_Tfr_ASN_LN.LKP_EV_ID;
0077: Update.CONFR_DLV_DT = Lnk_Join_Tfr_ASN_LN.SRC_CONFIRMED_DELV_DATE;
0078: Update.ASN_LN_NBR = Lnk_Join_Tfr_ASN_LN.SRC_ASN_LN_NBR;
0079: Update.SHPD_QTY_UOM_ID = Lnk_Join_Tfr_ASN_LN.QTY_UOM_ID;
0080: Update.SRC_SYSTEM_ID = Lnk_Join_Tfr_ASN_LN.SRC_SRC_SYS_ID;
0081: Update.LAST_UPDATE_DATE = timestamp_from_ustring(DSJobStartTimestamp);
0082: Update.UPDATED_BY = StageVar0_Stgupdatedby;
0083: writerecord 1;
0084: RowRejected0 = 0;
0085: }
0086: // evaluate columns (no constraints) for link: Exception
0087: Exception.BATCH_ID = Lnk_Join_Tfr_ASN_LN.BATCH_ID;
0088: Exception.JOB_ID = Lnk_Join_Tfr_ASN_LN.JOB_ID;
0089: Exception.JOBINSTANCE_ID = Lnk_Join_Tfr_ASN_LN.JOB_INSTANCE_ID;
0090: Exception.EXCEPTION_CODE = Lnk_Join_Tfr_ASN_LN.EXCEPTION_CODE;
0091: Exception.ERROR_MESSAGE = Lnk_Join_Tfr_ASN_LN.ERROR_MSG;
0092: Exception.RECORD_COUNTER = Lnk_Join_Tfr_ASN_LN.RECORD_COUNTER;
0093: Exception.STATUS_FLAG = Lnk_Join_Tfr_ASN_LN.RECORD_SRC;
0094: Exception.ASN_NUMBER = Lnk_Join_Tfr_ASN_LN.SRC_ASN_NUMBER;
0095: Exception.ASN_CREAT_DATE = Lnk_Join_Tfr_ASN_LN.SRC_ASN_CREAT_DATE;
0096: Exception.DESCRIPTION = Lnk_Join_Tfr_ASN_LN.SRC_DESCRIPTION;
0097: Exception.SUPPLIER_CODE = Lnk_Join_Tfr_ASN_LN.SRC_SUPPLIER_CODE;
0098: Exception.RECIPIENT_CODE = Lnk_Join_Tfr_ASN_LN.SRC_RECIPIENT_CODE;
0099: Exception.LANGUAGE_CODE = Lnk_Join_Tfr_ASN_LN.SRC_LANGUAGE_CODE;
0100: Exception.RECEIVED_DATE = Lnk_Join_Tfr_ASN_LN.SRC_RECEIVED_DATE;
0101: Exception.CHANNEL_CODE = Lnk_Join_Tfr_ASN_LN.SRC_CHANNEL_CODE;
0102: Exception.ASN_LN_NBR = Lnk_Join_Tfr_ASN_LN.SRC_ASN_LN_NBR;
0103: Exception.PO_NUMBER = Lnk_Join_Tfr_ASN_LN.SRC_PO_NUMBER;
0104: Exception.PO_LINE_NUMBER = Lnk_Join_Tfr_ASN_LN.SRC_PO_LINE_NUMBER;
0105: Exception.PRODUCT_CODE = Lnk_Join_Tfr_ASN_LN.PRODUCT_CODE;
0106: Exception.SHIPPED_QTY = Lnk_Join_Tfr_ASN_LN.SRC_SHIPPED_QTY;
0107: Exception.QTY_UOM = Lnk_Join_Tfr_ASN_LN.QTY_UOM;
0108: Exception.SUPPLIER_LOT_NUMBER = Lnk_Join_Tfr_ASN_LN.SRC_SUPPLIER_LOT_NUMBER;
0109: Exception.TRANSPORT_CODE = Lnk_Join_Tfr_ASN_LN.SRC_TRANSPORT_CODE;
0110: Exception.SHIPMENT_DATE = Lnk_Join_Tfr_ASN_LN.SRC_SHIPMENT_DATE;
0111: Exception.CONFIRMED_DELV_DATE = Lnk_Join_Tfr_ASN_LN.SRC_CONFIRMED_DELV_DATE;
0112: Exception.SRC_SYS_ID = Lnk_Join_Tfr_ASN_LN.SRC_SRC_SYS_ID;
0113: Exception.LOAD_DATE = Lnk_Join_Tfr_ASN_LN.SRC_LOAD_DATE;
0114: writerecord 2;
0115: RowRejected0 = 0;
0116: }
0117:
0118: finish {
0119: }
0120:
*** End of Internal Generated Transformer Code
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It would seem that the "$" character is not liked by the compiler. This would imply that you need to create a job parameter without a $-sign and fill it at runtime with with the project level variable, or use the function GetEnvironment("$EnvVar")
OddJob
Participant
Posts: 163
Joined: Tue Feb 28, 2006 5:00 am
Location: Sheffield, UK

Post by OddJob »

Wow, this is the third time this month that this issue has been raised. Are sanoojk, I_Server_Whale and Amar_nath all working on the same project? :lol:

You'll have to use GetEnvironment utility function.
DS_FocusGroup
Premium Member
Premium Member
Posts: 197
Joined: Sun Jul 15, 2007 11:45 pm
Location: Prague

Re: Warning when using environment variable in transformer s

Post by DS_FocusGroup »

I got the same error while compiling a job with range lookup,after installing the VC++ compiler i changed the default values of compiler environment variables in my Administrator client

FROM

APT_COMPILEOPT=-W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c -W/Zc:wchar_t-
APT_LINKOPT =-s -W/dll -W/base:0x50000000 -W/Zc:wchar_t-

TO

APT_COMPILEOPT=-W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c
APT_LINKOPT =-s -W/dll -W/base:0x50000000

And its worked , so try to remove the last few values like '-W/Zc:wchar_t-'
deanwalker
Participant
Posts: 82
Joined: Tue Jan 22, 2008 10:37 am
Location: UK

Post by deanwalker »

I think you posted this reply to another Transformer compilation error.
Using GetEnvironment is the correct workaround for 'this' problem.
pneumalin
Premium Member
Premium Member
Posts: 125
Joined: Sat May 07, 2005 6:32 am

Post by pneumalin »

Just a friendly correction to the exact syntax of using GetEnvironment:
It should be GetEnvironment("EnvVar"), NOT GetEnvironment("$EnvVar") . The '$' in the double quote however confuses the function and won't return the correct value.
I am using AIX 7.5.2, don't know if Windows 7.5.x2 present the same behavior for GetEnvironment...
Post Reply