Hi all,
I have wroten a basic routine that read a flat file and return values in an array. If i test it in a "routine way" (with the test button) or if i use it in a job control of a job Server, it's ok.
The problem occurs if i want to call in a routine stage through a job sequencer.
There's a warning:
SEQ_ODS_EXTR_SARCHEM..JobControl (@Routine_ReadParameters): Routine DSU.ReadParameters did not finish OK, return code = 'ENV
OSIRIS'
The Flat file begins with this parameter but there's a lot more.
It seems that the stage doesn't like arrays and it returns only the first line
Is it normal ? am i wrong ? or is it just a little bug DS ?
Here is the code :
************************************************************* Ans = ""
TabAns = ""
i = 1
NomRoutine = "ReadParameters"
OPENSEQ File TO ficIni THEN
LOOP
READSEQ ligneFicIni FROM ficIni
ON ERROR
msgRetour = "Erreur de lecture sur le fichier ":File
print "Erreur de lecture sur le fichier ":File
GOTO Erreur
END
THEN
IF COUNT(ligneFicIni,'=')=1 THEN
TabAns<i,1>= Trim(FIELD(ligneFicIni,'=',1))
TabAns<i,2>= Trim(FIELD(FIELD(ligneFicIni,'=',2),';',1))
i=i+1
END
END
ELSE
EXIT
END
REPEAT
END
ELSE
msgRetour = "Ouverture du fichier " : File : " impossible."
GOTO Erreur
END
GOTO Fin
Erreur:
CALL DSLogWarn( "test erreur =": msgRetour, NomRoutine )
Fin:
Ans = TabAns
Stage Routine in job sequencer
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
None of the above. A job sequence will always treat a non-zero return value from a routine as a "failure". To avoid this, you need to explicitly put in place a Failure trigger from the Routine activity. This can go to the same Sequencer as the OK trigger if you like. Bonne chance!
Please format your code and enclose it in Code tags.
Please format your code and enclose it in Code tags.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.