DSD Run Error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
clarcombe
Premium Member
Premium Member
Posts: 515
Joined: Wed Jun 08, 2005 9:54 am
Location: Europe

DSD Run Error

Post by clarcombe »

We are running some jobs which are doing simple transformations from text file to text file.

The following error occurs when lots of jobs are run together

DataStage Job 474 Phantom 1418
Program "DSD.RUN": Line 2166, Variable previously undefined. Zero length string used.
Program "DSD.RUN": Line 2166, Variable previously undefined. Zero length string used.

It always occurs in the same job, and I believe it is due to the definition of the stage variables

Value - Variable being set
  • cle - oldcle

    (If IsNull(DonneeCible_vers_MiseEnForme.S1_CIF_ID) Then "" Else DonneeCible_vers_MiseEnForme.S1_CIF_ID) : @VM : (If IsNull(DonneeCible_vers_MiseEnForme.BUSINESS_UNIT) Then "" Else DonneeCible_vers_MiseEnForme.BUSINESS_UNIT) : @VM :(If IsNull(DonneeCible_vers_MiseEnForme.JOURNAL_DATE) Then "" Else DonneeCible_vers_MiseEnForme.JOURNAL_DATE) : @VM : (If IsNull(DonneeCible_vers_MiseEnForme.DOC_TYPE) Then "" Else DonneeCible_vers_MiseEnForme.DOC_TYPE) : @VM : (If IsNull(DonneeCible_vers_MiseEnForme.LEDGER_GROUP) Then "" Else DonneeCible_vers_MiseEnForme.LEDGER_GROUP) : @VM : (If IsNull(DonneeCible_vers_MiseEnForme.TRANS_REF_NUM) Then "" Else DonneeCible_vers_MiseEnForme.TRANS_REF_NUM) : @VM : (If IsNull(DonneeCible_vers_MiseEnForme.S1_DATE_ORIGIN) Then "" Else DonneeCible_vers_MiseEnForme.S1_DATE_ORIGIN) : @VM : (If IsNull(DonneeCible_vers_MiseEnForme.LEDGER) Then "" Else DonneeCible_vers_MiseEnForme.LEDGER) - cle

    if cle <> oldcle then compteur+1 else compteur - compteur

    if cle <> oldcle then DonneeCible_vers_MiseEnForme.S1_ID_FLUX : DonneeCible_vers_MiseEnForme.S1_NO_EMISSION : "_" : DonneeCible_vers_MiseEnForme.S1_ID_SSFLUX : "_" : compteur else codecif ) - codecif

    if cle <> oldcle then 1 else numligne+1 - numligne
Each of the stage variables has an initial value defined
oldcle - "-1"
cle - ""
compteur - (date()*86400) + Time()
codecif - ""
numligne - 1

Questions
Is there anyway I can know what is happening at line 2166
Should I initialise the variables to something other than "". Does initialising them actually do anything ?

BTW I have inherited this code. If I fully understood it I don't think I would have done it this way :wink:
Colin Larcombe
-------------------

Certified IBM Infosphere Datastage Developer
clarcombe
Premium Member
Premium Member
Posts: 515
Joined: Wed Jun 08, 2005 9:54 am
Location: Europe

Post by clarcombe »

I have investigated further and discovered that I get exactly the same error in different jobs within the same sequence.
e.g. InitFichierCible gives this error
DataStage Job 447 Phantom 13607
Program "DSD.RUN": Line 2166, Variable previously undefined. Zero length string used.
Program "DSD.RUN": Line 2166, Variable previously undefined. Zero length string used.
Program "DSD.RUN": Line 2166, Variable previously undefined. Zero length string used.
and DonneeCible gives this
DataStage Job 446 Phantom 13741
Program "DSD.RUN": Line 2166, Variable previously undefined. Zero length string used.
Program "DSD.RUN": Line 2166, Variable previously undefined. Zero length string used.

All these errors are generated if we invoke several instances (4 or more) of the job sequence at the same time via a script or an automated process.

However, when I schedule individual instances to run at the same time via the director, the error does not occur.

My guess is that it the issue is not code based but resource based.

Question
Is there something I have to change in the uvconfig to allow several jobs to be invoked at the same time.
Colin Larcombe
-------------------

Certified IBM Infosphere Datastage Developer
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

No uvconfig changes will affect the multiinstance behaviour.

The "compteur" variable use is quite odd, particularly adding the internal date (days since Dec 31 1967) and internal time (seconds since midnight).

Wait a second, I recall issues when using numeric instance numbers. Is that the case for you? Can you use alphanumeric instance names?
clarcombe
Premium Member
Premium Member
Posts: 515
Joined: Wed Jun 08, 2005 9:54 am
Location: Europe

Post by clarcombe »

My instance names are as follows

MefGL_DonneeCible.SIC_GEODE_PREST000017_000_GL_MefGL_DonneeCible

I am wondering whether it is worth opening a call with IBM for this.
Colin Larcombe
-------------------

Certified IBM Infosphere Datastage Developer
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you can go into the TCL environment, then issue the command "VLIST DSD_BP DSD_RUN.B" and post the lines with 2160 through 2170 in the left hand column.
clarcombe
Premium Member
Premium Member
Posts: 515
Joined: Wed Jun 08, 2005 9:54 am
Location: Europe

Post by clarcombe »

02160 050F8 : 0F8 move "DSTAGE_RUN_E_0438" => _T0359
02160 050FE : 0F8 move "Environment variable '%1' type mismatch. Job parameter is encrypted, but environment variable definition is not. Please correct by reloading the job parameter in the designer, or changing the environment variable type in the admin client" => _T0360
02160 05104 : 196 subr "*DataStage*DSR_LOADSTRING" _T0359 _T0360 PARAM.NAME => DEFER.ERROR.MESSAGE
02160 05112 : 0C2 jump 05152:
02161 05118 : 106 ne PARAM.TYPE 1 => $R255
02161 05120 : 06E eq ENV.TYPE "Encrypted" => $R256
02161 05128 : 008 and $R255 $R256 => $R257
02161 05130 : 2DE testfw $R257 05152:
02162 05138 : 0F8 move "DSTAGE_RUN_E_0439" => _T0361
02162 0513E : 0F8 move "Environment variable '%1' type mismatch. Job parameter is not encrypted, but environment variable definition is encrypted. Please correct by reloading the job parameter in the designer, or changing the environment variable type in the admin client" => _T0362
02162 05144 : 196 subr "*DataStage*DSR_LOADSTRING" _T0361 _T0362 PARAM.NAME => DEFER.ERROR.MESSAGE
02166 05152 : 106 ne Errmsg "" => $R251
02166 0515A : 2DE testfw $R251 05166:
02167 05164 : 15C return
Press any key to continue...
02174 05166 : 06E eq DECRYPTED.VALUE "$ENV" => $R250
02174 0516E : 2DE testfw $R250 05292:[
Colin Larcombe
-------------------

Certified IBM Infosphere Datastage Developer
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

That is a strange code location - are you using encrypted parameters and/or $ENV settings in the job? Also, if you repeat the VLIST and grep out lines with reference to "$251" we can see where that variable is assigned.
clarcombe
Premium Member
Premium Member
Posts: 515
Joined: Wed Jun 08, 2005 9:54 am
Location: Europe

Post by clarcombe »

Results of $DSHOME/bin/uvsh "VLIST DSD_BP DSD_RUN.B" | grep 251 > out.txt

00934 0251C : 060 dyn_extract STAGECOM.JOB.CONFIG 9 IX 0 => $R81
01251 0305A : 2DE testfw JOB.STOPPING 03070:
01251 03064 : 0F8 move JOB.STOPPING => JOB.STOPPING
01251 0306A : 0C2 jump 03076:
01251 03070 : 0F8 move 1 => JOB.STOPPING
01315 032DC : 0F8 move "DSTAGE_RUN_I_0093" => _T0251
01315 032EE : 196 subr "*DataStage*DSR_LOADSTRING" _T0251 _T0252 _T0253 => Message
02144 0507C : 06E eq ErrorMsg "" => $R251
02144 05084 : 2DE testfw $R251 05092:
02154 050B0 : 196 subr "DSD.GetProjEnvVarValue" Errmsg PARAM.NAME PARAM.VALUE ENV.TYPE => $R251
02154 050C0 : 2DE testfw $R251 05152:
02166 05152 : 106 ne Errmsg "" => $R251
02166 0515A : 2DE testfw $R251 05166:
02180 05178 : 0D0 len PARAM.NAME => $R251
02180 0517E : 0F0 mid PARAM.NAME 2 $R251 => LOCAL.ENV.NAME
02182 05192 : 106 ne LOCAL.ENV.SETTING "" => $R251
02182 0519A : 2DE testfw $R251 0525C:
02251 0536C : 0F8 move 2 => Arg1
02280 0542E : 106 ne ProjectMessageHandler "" => $R251
02280 05436 : 008 and $R250 $R251 => $R254
Colin Larcombe
-------------------

Certified IBM Infosphere Datastage Developer
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

All these errors are generated if we invoke several instances (4 or more) of the job sequence at the same time via a script or an automated process.

However, when I schedule individual instances to run at the same time via the director, the error does not occur.
Shall i know how did you invoke all instances of the Job Sequecne via script?(especially options of the command 'dsjob')
clarcombe
Premium Member
Premium Member
Posts: 515
Joined: Wed Jun 08, 2005 9:54 am
Location: Europe

Post by clarcombe »

/moteurs/datastage/Ascential/DataStage/DSEngine/bin/dsjob -server s64lmwbibod.dsit.sncf.fr -user dsdev -password Password -run -param PARfichierSource=SIC_GEODE_PREST000015_000_GL -wait COP_DEV GL2_Seq.SIC_GEODE_PREST000015_000_GL &
Colin Larcombe
-------------------

Certified IBM Infosphere Datastage Developer
clarcombe
Premium Member
Premium Member
Posts: 515
Joined: Wed Jun 08, 2005 9:54 am
Location: Europe

Post by clarcombe »

I opened a call with IBM and they came up with a patch for DSD_BP.O.

This was applied in all projects and fixed the issue.

The patch was Ecase 99919 in case anyone else gets this issue.
Colin Larcombe
-------------------

Certified IBM Infosphere Datastage Developer
Post Reply