Warning in Function compilation
Posted: Thu Mar 24, 2005 12:07 pm
Hi,
I tried to compile the next function:
---------------------------------------------------------------------------
$INCLUDE DSINCLUDE JOBCONTROL.H
Call DSLogInfo('Funzione ABISParameter-- Inizio','ABISParameter' )
KshPath="/var/opt/ascential/abis/shell/"
DataPath="/var/opt/ascential/abis/data/"
Ans='ND'
If substrings (NOME_JOB,1,3) ='Log' Then
JOBID=substrings (NOME_JOB,4,Len(NOME_JOB))
End
Else
JOBID=NOME_JOB
End
If Left(JOBID,8 ) = "H3GITmis" Then
hJob=DSAttachJob(JOBID , DSJ.ERRFATAL)
STATO = DSGetJobInfo(hJob,DSJ.JOBSTATUS)
Call DSLogInfo ('Stato job -->':STATO ,'ABIS')
if ((STATO= '97') OR (STATO = '3')) Then
ErrorCode=DSRunJob(hJob, DSJ.RUNRESET)
End
ParList=DSGetJobInfo(hJob,DSJ.PARAMLIST)
ParList=" ":CHANGE(ParList,","," , "):" "
If INDEX(ParList," PARAMETRO",1)> 0 Then
StartName=INDEX(ParList," PARAMETRO",1)
ParList=trim(substrings(ParList,StartName,Len(ParList)))
If INDEX(ParList," ",1) > 1 Then
EndName=INDEX(ParList," ",1)
ParName=trim(substrings(ParList, 1, EndName))
End
Else
ParName=trim(ParList)
End
Start=INDEX(ParName,"_",1)
EndLen=Len(ParName)
NumPar=trim(substrings(ParName, Start+1, EndLen))
NomeFile=DataPath:'ABIS_params_':NumPar
NomeParametro='PARAMETRO_':NumPar
Call DSLogInfo('Lettura del parametro numero ':NumPar ,"ABISReadParameter")
KshReadPar.Cmd = KshPath:"EXC_PARALLEL_PARAMS.ksh ":STGUSR:" ":STGPSW:" ":STGDB:" ":NumPar
Call 'DSU.ExecSH'(KshReadPar.Cmd, r$6)
KshReadPar.$ReturnValue = r$6
OpenSeq NomeFile To FileVar Else Call DSLogFatal('Errore nella lettura del parametro ':NumPar , "ABISReadParameter")
ReadSeq Valore From FileVar Then ValoreParametro = Valore
CloseSeq FileVar
If ValoreParametro='' then
Call DSLogWarn('Errore nel parametro di filtro ':NumPar, 'ABISReadParameter')
Abort
End
Call DSLogInfo('Parametro -->':ValoreParametro:'<--',"ABISReadParameter")
Ans=ValoreParametro
End
End
Call DSLogInfo('Funzione ABISParameter -- Fine','ABISParameter' )
-----------------------------------------------------------------------------
The function input variable are:
NOME_JOB
STGDB
STGUSR
STGPSW
When I try to compile the code i Obtain the next warning:
WARNING: Variable-> 'NomeFile' is substituted for-> 'STGDB' on line-> '64' If an input link column variable is used for this argument DataStage runtime may fail.
WARNING: Variable-> 'Valore' is substituted for-> 'STGDB' on line-> '66' If an input link column variable is used for this argument DataStage runtime may fail.
WARNING: Variable-> 'FileVar' is substituted for-> 'STGUSR' on line-> '67' If an input link column variable is used for this argument DataStage runtime may fail.
WARNING: Variable-> 'FileVar' is substituted for-> 'STGPSW' on line-> '67' If an input link column variable is used for this argument DataStage runtime may fail.
Compiled with no errors
Why?
I don't understand the warnig messages.
Can someone help me?
Thanks in advance
Regards
Mario Loreti
I tried to compile the next function:
---------------------------------------------------------------------------
$INCLUDE DSINCLUDE JOBCONTROL.H
Call DSLogInfo('Funzione ABISParameter-- Inizio','ABISParameter' )
KshPath="/var/opt/ascential/abis/shell/"
DataPath="/var/opt/ascential/abis/data/"
Ans='ND'
If substrings (NOME_JOB,1,3) ='Log' Then
JOBID=substrings (NOME_JOB,4,Len(NOME_JOB))
End
Else
JOBID=NOME_JOB
End
If Left(JOBID,8 ) = "H3GITmis" Then
hJob=DSAttachJob(JOBID , DSJ.ERRFATAL)
STATO = DSGetJobInfo(hJob,DSJ.JOBSTATUS)
Call DSLogInfo ('Stato job -->':STATO ,'ABIS')
if ((STATO= '97') OR (STATO = '3')) Then
ErrorCode=DSRunJob(hJob, DSJ.RUNRESET)
End
ParList=DSGetJobInfo(hJob,DSJ.PARAMLIST)
ParList=" ":CHANGE(ParList,","," , "):" "
If INDEX(ParList," PARAMETRO",1)> 0 Then
StartName=INDEX(ParList," PARAMETRO",1)
ParList=trim(substrings(ParList,StartName,Len(ParList)))
If INDEX(ParList," ",1) > 1 Then
EndName=INDEX(ParList," ",1)
ParName=trim(substrings(ParList, 1, EndName))
End
Else
ParName=trim(ParList)
End
Start=INDEX(ParName,"_",1)
EndLen=Len(ParName)
NumPar=trim(substrings(ParName, Start+1, EndLen))
NomeFile=DataPath:'ABIS_params_':NumPar
NomeParametro='PARAMETRO_':NumPar
Call DSLogInfo('Lettura del parametro numero ':NumPar ,"ABISReadParameter")
KshReadPar.Cmd = KshPath:"EXC_PARALLEL_PARAMS.ksh ":STGUSR:" ":STGPSW:" ":STGDB:" ":NumPar
Call 'DSU.ExecSH'(KshReadPar.Cmd, r$6)
KshReadPar.$ReturnValue = r$6
OpenSeq NomeFile To FileVar Else Call DSLogFatal('Errore nella lettura del parametro ':NumPar , "ABISReadParameter")
ReadSeq Valore From FileVar Then ValoreParametro = Valore
CloseSeq FileVar
If ValoreParametro='' then
Call DSLogWarn('Errore nel parametro di filtro ':NumPar, 'ABISReadParameter')
Abort
End
Call DSLogInfo('Parametro -->':ValoreParametro:'<--',"ABISReadParameter")
Ans=ValoreParametro
End
End
Call DSLogInfo('Funzione ABISParameter -- Fine','ABISParameter' )
-----------------------------------------------------------------------------
The function input variable are:
NOME_JOB
STGDB
STGUSR
STGPSW
When I try to compile the code i Obtain the next warning:
WARNING: Variable-> 'NomeFile' is substituted for-> 'STGDB' on line-> '64' If an input link column variable is used for this argument DataStage runtime may fail.
WARNING: Variable-> 'Valore' is substituted for-> 'STGDB' on line-> '66' If an input link column variable is used for this argument DataStage runtime may fail.
WARNING: Variable-> 'FileVar' is substituted for-> 'STGUSR' on line-> '67' If an input link column variable is used for this argument DataStage runtime may fail.
WARNING: Variable-> 'FileVar' is substituted for-> 'STGPSW' on line-> '67' If an input link column variable is used for this argument DataStage runtime may fail.
Compiled with no errors
Why?
I don't understand the warnig messages.
Can someone help me?
Thanks in advance
Regards
Mario Loreti