Sei sulla pagina 1di 243

DATASTAGE FAQs & TUTORIALs TOPIC INDEX

1. DATASTAGE QUESTIONS ............................................................................. 2


2. DATASTAGE FAQ from GEEK INTERVIEW QUESTIONS ...................... 13
3. DATASTAGE FAQ ......................................................................................... 26
4. TOP 10 FEATURES IN DATASTAGE HAWK ............................................. 30
5. DATASTAGE NOTES .................................................................................... 32
6. DATASTAGE TUTORIA ............................................................................. 43
............................................................................................................................................ 44
A!o"# D$#$S#$%& ................................................................................................................. 44
'()&*# 'om+o*&*#, ............................................................................................................. 44
D$#$S#$%& D&,)%*&r. .......................................................................................................... 44
D$#$S#$%& D)r&-#or. ............................................................................................................ 44
D$#$S#$%& .$*$%&r. ........................................................................................................... 44
D$#$S#$%& A/m)*),#r$#or .................................................................................................... 44
D$#$S#$%& .$*$%&r Ro(&, .................................................................................................. 44
S&r0&r 'om+o*&*#, ............................................................................................................ 45
D$#$S#$%& F&$#"r&, ............................................................................................................. 45
T1+&, of 2o!, ...................................................................................................................... 45
D$#$S#$%& NS ................................................................................................................... 46
3O4 ..................................................................................................................................... 46
4")(#5I* S#$%&, 6 S&r0&r 3o!, ............................................................................................. 46
A%%r&%$#or. ........................................................................................................................ 46
H$,7&/ F)(&. ....................................................................................................................... 46
U*)V&r,&. ........................................................................................................................... 48
U*)D$#$. ............................................................................................................................. 48
OD4'. ................................................................................................................................ 48
S&9"&*#)$( F)(&. .................................................................................................................. 48
Fo(/&r S#$%&. ...................................................................................................................... 4:
Tr$*,form&r. ....................................................................................................................... 4:
'o*#$)*&r. ........................................................................................................................... 4:
IP' S#$%&. ........................................................................................................................... 4:
)*; 'o((&-#or S#$%&. .......................................................................................................... 4<
)*; P$r#)#)o*&r S#$%&. ........................................................................................................ 4<
S&r0&r 3o! Pro+&r#)&, .......................................................................................................... 4<
'o*#$)*&r, ........................................................................................................................... 50
o-$( -o*#$)*&r,. ............................................................................................................... 50
S7$r&/ -o*#$)*&r,. ............................................................................................................. 50
3o! S&9"&*-&, ..................................................................................................................... 50
8. EARN FEATURES OF DATASTAGE ......................................................... 51
:. INFOR.ATI'A 0, DATASTAGE= ................................................................ <3
Page 1 of 243
<. 4EFORE >OU DESIGN >OUR APPI'ATION ........................................ 104
10. DATASTAGE 8.5?1 GUI FEATURES ......................................................... 111
11. DATASTAGE @ DWH INTERVIEW QUESTIONS ................................... 115
12. DATASTAGE ROUTINES ............................................................................ 12<
13. SETA3O4APARA.ETERSAROUTINE ........................................................ 1<8
DATASTAGE QUESTIONS
1. What is the flow of loading data into fact & dimensional tables?
AB Fact table 5 T$!(& C)#7 'o((&-#)o* of For&)%* K&1, -orr&,+o*/)*% #o #7& Pr)m$r1 K&1,
)* D)m&*,)o*$( #$!(&. 'o*,),#, of f)&(/, C)#7 *"m&r)- 0$("&,.
Dimension table 5 T$!(& C)#7 U*)9"& Pr)m$r1 K&1.
Load 5 D$#$ ,7o"(/ !& f)r,# (o$/&/ )*#o /)m&*,)o*$( #$!(&. 4$,&/ o* #7& +r)m$r1 ;&1
0$("&, )* /)m&*,)o*$( #$!(&D #7& /$#$ ,7o"(/ !& (o$/&/ )*#o F$-# #$!(&.
2. What is the default cache size? How do you change the cache size if needed?
A. D&f$"(# -$-7& ,)E& ), 256 MB. W& -$* )*-r&$,& )# !1 %o)*% )*#o D$#$,#$%&
A/m)*),#r$#or $*/ ,&(&-#)*% #7& T"*$!(& T$! $*/ ,+&-)f1 #7& -$-7& ,)E& o0&r #7&r&.

3. What are types of Hashed File?
AB H$,7&/ F)(& ), -($,,)f)&/ !ro$/(1 )*#o 2 #1+&,.
$B Static 5 S"! /)0)/&/ )*#o 18 #1+&, !$,&/ o* Pr)m$r1 K&1 P$##&r*.
!B Dynamic 5 ,"! /)0)/&/ )*#o 2 #1+&,
)B G&*&r)- ))B S+&-)f)-.
Page 2 of 243
D1*$m)- f)(&, /o *o# +&rform $, C&(( $, $ C&((D /&,)%*&/ ,#$#)- f)(&D !"# /o +&rform !&##&r
#7$* $ !$/(1 /&,)%*&/ o*&. W7&* -r&$#)*% $ /1*$m)- f)(& 1o" -$* ,+&-)f1 #7& fo((oC)*%
A(#7o"%7 $(( of #7&,& 7$0& /&f$"(# 0$("&,B
41 D&f$"(# H$,7&/ f)(& ), FD1*$m)- 5 T1+& R$*/om 30 DF

4. What does a Config File in parallel extender consist of?
AB 'o*f)% f)(& -o*,),#, of #7& fo((oC)*%.
$B N"m!&r of Pro-&,,&, or No/&,.
!B A-#"$( D),; S#or$%& o-$#)o*.

5. What is Modulus and Splitting in Dynamic Hashed File?
A. I* $ H$,7&/ F)(&D #7& ,)E& of #7& f)(& ;&&+, -7$*%)*% r$*/om(1.
If #7& ,)E& of #7& f)(& )*-r&$,&, )# ), -$((&/ $, F.o/"(",F.
If #7& ,)E& of #7& f)(& /&-r&$,&, )# ), -$((&/ $, FS+()##)*%F.

6. What are Stage Variables, Derivations and Constants?
A. Stage Variable 5 A* )*#&rm&/)$#& +ro-&,,)*% 0$r)$!(& #7$# r&#$)*, 0$("& /"r)*% r&$/
$*/ /o&,*G# +$,, #7& 0$("& )*#o #$r%&# -o("m*.
Derivation 5 E?+r&,,)o* #7$# ,+&-)f)&, 0$("& #o !& +$,,&/ o* #o #7& #$r%&# -o("m*.
Constant 5 'o*/)#)o*, #7$# $r& &)#7&r #r"& or f$(,& #7$# ,+&-)f)&, f(oC of /$#$ C)#7 $ ()*;.
7. Types of views in Datastage Director?
T7&r& $r& 3 #1+&, of 0)&C, )* D$#$,#$%& D)r&-#or
$B 1ob View 5 D$#&, of 3o!, 'om+)(&/.
!B Log View 5 S#$#", of 3o! ($,# r"*
-B Status View 5 W$r*)*% .&,,$%&,D E0&*# .&,,$%&,D Pro%r$m G&*&r$#&/ .&,,$%&,.

8. Types of Parallel Processing?
AB P$r$((&( Pro-&,,)*% ), !ro$/(1 -($,,)f)&/ )*#o 2 #1+&,.
$B SMP 5 S1mm&#r)-$( ."(#) Pro-&,,)*%.
!B MPP 5 .$,,)0& P$r$((&( Pro-&,,)*%.
9. Orchestrate Vs Datastage Parallel Extender?
AB Or-7&,#r$#& )#,&(f ), $* ET #oo( C)#7 &?#&*,)0& +$r$((&( +ro-&,,)*% -$+$!)()#)&, $*/
r"**)*% o* UNIH +($#form. D$#$,#$%& ",&/ Or-7&,#r$#& C)#7 D$#$,#$%& HE I4&#$ 0&r,)o*
of 6.0B #o )*-or+or$#& #7& +$r$((&( +ro-&,,)*% -$+$!)()#)&,. NoC D$#$,#$%& 7$, +"r-7$,&/
Or-7&,#r$#& $*/ )*#&%r$#&/ )# C)#7 D$#$,#$%& HE $*/ r&(&$,&/ $ *&C 0&r,)o* D$#$,#$%& 6.0
).& P$r$((&( E?#&*/&r.

10. Importance of Surrogate Key in Data warehousing?
AB S"rro%$#& K&1 ), $ Pr)m$r1 K&1 for $ D)m&*,)o* #$!(&. .o,# )m+or#$*-& of ",)*% )# ),
)# ), )*/&+&*/&*# of "*/&r(1)*% /$#$!$,&. ).&. S"rro%$#& K&1 ), *o# $ff&-#&/ !1 #7& -7$*%&,
%o)*% o* C)#7 $ /$#$!$,&.

11. How to run a Shell Script within the scope of a Data stage job?
AB 41 ",)*% FE?-&-SHF -omm$*/ $# 4&for&JAf#&r 2o! +ro+&r#)&,.
Page 3 of 243
12. How to handle Date conversions in Datastage? Convert a mm/dd/yyyy format to
yyyy-dd-mm?
AB W& ",& $B FI-o*0F f"*-#)o* 5 I*#&r*$( 'o*0&r,)o*.
!B FO-o*0F f"*-#)o* 5 E?#&r*$( 'o*0&r,)o*.
F"*-#)o* #o -o*0&r# mmJ//J1111 form$# #o 11115//5mm ),
O-o*0II-o*0IF)(&/*$m&DFDJ.D>K2D2D4LFBDFD5.D>K2D2D4LFB
13 How do you execute datastage job from command line prompt?
AB U,)*% F/,2o!F -omm$*/ $, fo((oC,.
/,2o! 5r"* 52o!,#$#", +ro2&-#*$m& 2o!*$m&

14. Functionality of Link Partitioner and Link Collector?
Link Partitioner: I# $-#"$((1 ,+()#, /$#$ )*#o 0$r)o", +$r#)#)o*, or /$#$ f(oC, ",)*% 0$r)o",
+$r#)#)o* m&#7o/,.
Link Collector: I# -o((&-#, #7& /$#$ -om)*% from +$r#)#)o*,D m&r%&, )# )*#o $ ,)*%(& /$#$
f(oC $*/ (o$/, #o #$r%&#.

15. Types of Dimensional Modeling?
AB D)m&*,)o*$( mo/&()*% ), $%$)* ,"! /)0)/&/ )*#o 2 #1+&,.
$B S#$r S-7&m$ 5 S)m+(& @ ."-7 F$,#&r. D&*orm$()E&/ form.
!B S*oCf($;& S-7&m$ 5 'om+(&? C)#7 mor& Gr$*"($r)#1. .or& *orm$()E&/ form.
16. Differentiate Primary Key and Partition Key?
Pr)m$r1 K&1 ), $ -om!)*$#)o* of "*)9"& $*/ *o# *"((. I# -$* !& $ -o((&-#)o* of ;&1 0$("&,
-$((&/ $, -om+o,)#& +r)m$r1 ;&1. P$r#)#)o* K&1 ), $ 2",# $ +$r# of Pr)m$r1 K&1. T7&r& $r&
,&0&r$( m&#7o/, of +$r#)#)o* ();& H$,7D D42D $*/ R$*/om &#-. W7)(& ",)*% H$,7 +$r#)#)o*
C& ,+&-)f1 #7& P$r#)#)o* K&1.
17. Differentiate Database data and Data warehouse data?
AB D$#$ )* $ D$#$!$,& ),
$B D&#$)(&/ or Tr$*,$-#)o*$(
!B 4o#7 R&$/$!(& $*/ Wr)#$!(&.
-B '"rr&*#.

18. Containers Usage and Types?
'o*#$)*&r ), $ -o((&-#)o* of ,#$%&, ",&/ for #7& +"r+o,& of R&",$!)()#1.
T7&r& $r& 2 #1+&, of 'o*#$)*&r,.
a) Local Container: 3o! S+&-)f)-
b) Shared Container: U,&/ )* $*1 2o! C)#7)* $ +ro2&-#.
19. Compare and Contrast ODBC and Plug-In stages?
OD4'= $B Poor P&rform$*-&.
!B '$* !& ",&/ for V$r)&#1 of D$#$!$,&,.
-B '$* 7$*/(& S#or&/ Pro-&/"r&,.
Page 4 of 243
P("%5I*= $B Goo/ P&rform$*-&.
!B D$#$!$,& ,+&-)f)-. IO*(1 o*& /$#$!$,&B
-B '$**o# 7$*/(& S#or&/ Pro-&/"r&,.
20. Dimension Modelling types along with their significance
D$#$ .o/&(()*% ), 4ro$/(1 -($,,)f)&/ )*#o 2 #1+&,.
$B E5R D)$%r$m, IE*#)#1 5 R&($#)o,7)+,B.
!B D)m&*,)o*$( .o/&(()*%.
Q 21 What are Ascential Dastastage Products, Connectivity
Ans:
Ascential Products
A,-&*#)$( D$#$S#$%&
A,-&*#)$( D$#$S#$%& EE I3B
A,-&*#)$( D$#$S#$%& EE .VS
A,-&*#)$( D$#$S#$%& TH
A,-&*#)$( Q"$()#1S#$%&
A,-&*#)$( .&#$S#$%&
A,-&*#)$( RTI I2B
A,-&*#)$( Prof)(&S#$%&
A,-&*#)$( A"/)#S#$%&
A,-&*#)$( 'omm&r-& .$*$%&r
I*/",#r1 So("#)o*,
Connectivity
F)(&,
RD4.S
R&$(5#)m&
PA'K,
EDI
O#7&r
Q 22 Explain Data Stage Architecture?
D$#$ S#$%& -o*#$)*, #Co -om+o*&*#,D
Client Component.
Server Component.
Client Component:
D$#$ S#$%& A/m)*),#r$#or.
D$#$ S#$%& .$*$%&r
D$#$ S#$%& D&,)%*&r
D$#$ S#$%& D)r&-#or
Server Components:
D$#$ S#$%& E*%)*&
.&#$ D$#$ R&+o,)#or1
Page 5 of 243
P$-;$%& I*,#$((&r
Data Stage Administrator:
U,&/ #o -r&$#& #7& +ro2&-#.
'o*#$)*, ,&# of +ro+&r#)&,
W& -$* ,&# #7& !"ff&r ,)E& I!1 /&f$"(# 12: .4B
W& -$* )*-r&$,& #7& !"ff&r ,)E&.
W& -$* ,&# #7& E*0)ro*m&*# V$r)$!(&,.
I* #"*$!(& C& 7$0& )* +ro-&,, $*/ )*#&r5+ro-&,,
I*5+ro-&,,MD$#$ r&$/ )* ,&9"&*#)$((1
I*#&r5+ro-&,,M I# r&$/, #7& /$#$ $, )# -om&,.
I# 2",# )*#&rf$-&, #o m&#$/$#$.
Data Stage Manager:
W& -$* 0)&C $*/ &/)# #7& .&#$ /$#$ R&+o,)#or1.
W& -$* )m+or# #$!(& /&f)*)#)o*,.
W& -$* &?+or# #7& D$#$ ,#$%& -om+o*&*#, )* .xml or .dsx form$#.
W& -$* -r&$#& ro"#)*&, $*/ #r$*,form,
W& -$* -om+)(& #7& m"(#)+(& 2o!,.
Page 6 of 243
Data Stage Designer:
W& -$* -r&$#& #7& 2o!,. W& -$* -om+)(& #7& 2o!. W& -$* r"* #7& 2o!. W& -$*
/&-($r& ,#$%& 0$r)$!(& )* #r$*,formD C& -$* -$(( ro"#)*&,D #r$*,formD m$-ro,D f"*-#)o*,.
W& -$* Cr)#& -o*,#r$)*#,.
Data Stage Director:
W& -$* r"* #7& 2o!,.
W& -$* ,-7&/"(& #7& 2o!,. IS-7&/"(& -$* !& /o*& /$)(1D C&&;(1D mo*#7(1D 9"$r#&r(1B
W& -$* mo*)#or #7& 2o!,.
W& -$* r&(&$,& #7& 2o!,.
Q 23 What is Meta Data Repository?
.&#$ D$#$ ), $ /$#$ $!o"# #7& /$#$.
I# $(,o -o*#$)*,
Q"&r1 ,#$#),#)-,
ET ,#$#),#)-,
4",)*&,, ,"!2&-# $r&$
So"r-& I*form$#)o*
T$r%&# I*form$#)o*
So"r-& #o T$r%&# m$++)*% I*form$#)o*.
Q 24 What is Data Stage Engine?
Page 7 of 243
I# ), $ 3AVA &*%)*& r"**)*% $# #7& !$-;%ro"*/.
Q 25 What is Dimensional Modeling?
D)m&*,)o*$( .o/&()*% ), $ (o%)-$( /&,)%* #&-7*)9"& #7$# ,&&;, #o +r&,&*# #7& /$#$
)* $ ,#$*/$r/ fr$m&Cor; #7$# ),D )*#")#)0& $*/ $((oC, for 7)%7 +&rform$*-& $--&,,.
Q 26 What is Star Schema?
S#$r S-7&m$ ), $ /&5*orm$()E&/ m"(#)5/)m&*,)o*$( mo/&(. I# -o*#$)*, -&*#r$()E&/ f$-#
#$!(&, ,"rro"*/&/ !1 /)m&*,)o*, #$!(&.
D)m&*,)o* T$!(&= I# -o*#$)*, $ +r)m$r1 ;&1 $*/ /&,-r)+#)o* $!o"# #7& f$-# #$!(&.
F$-# T$!(&= I# -o*#$)*, for&)%* ;&1, #o #7& /)m&*,)o* #$!(&,D m&$,"r&, $*/ $%%r&%$#&,.
Q 27 What is surrogate Key?
I# ), $ 45!1#& )*#&%&r C7)-7 r&+($-&, #7& #r$*,$-#)o* J !",)*&,, J OTP ;&1 )* #7&
/)m&*,)o* #$!(&. W& -$* ,#or& "+ #o 2 !)(()o* r&-or/.
Q 28 Why we need surrogate key?
I# ), ",&/ for )*#&%r$#)*% #7& /$#$ m$1 7&(+ !&##&r for +r)m$r1 ;&1.
I*/&? m$)*#&*$*-&D 2o)*,D #$!(& ,)E&D ;&1 "+/$#&,D /),-o**&-#&/ )*,&r#, $*/
+$r#)#)o*)*%.
Q 29 What is Snowflake schema?
I# ), +$r#)$((1 *orm$()E&/ /)m&*,)o*$( mo/&( )* C7)-7 $# #Co r&+r&,&*#, (&$,# o*&
/)m&*,)o* or mor& 7)&r$r-71 r&($#&/ #$!(&,.
Q 30 Explain Types of Fact Tables?
Factless Fact: I# -o*#$)*, o*(1 for&)%* ;&1, #o #7& /)m&*,)o* #$!(&,.
Additive Fact: .&$,"r&, -$* !& $//&/ $-ro,, $*1 /)m&*,)o*,.
Semi-Additive: .&$,"r&, -$* !& $//&/ $-ro,, ,om& /)m&*,)o*,. E%D N $%&D /),-o"*#
Non-Additive: .&$,"r&, -$**o# !& $//&/ $-ro,, $*1 /)m&*,)o*,. E%D A0&r$%&
Conformed Fact: T7& &9"$#)o* or #7& m&$,"r&, of #7& #Co f$-# #$!(&, $r& #7& ,$m& "*/&r
#7& f$-#, $r& m&$,"r&/ $-ro,, #7& /)m&*,)o*, C)#7 $ ,$m& ,&# of m&$,"r&,.
Q 31 Explain the Types of Dimension Tables?
Conformed Dimension: If $ /)m&*,)o* #$!(& ), -o**&-#&/ #o mor& #7$* o*& f$-# #$!(&D
#7& %r$*"($r)#1 #7$# ), /&f)*&/ )* #7& /)m&*,)o* #$!(& ), -ommo* $-ro,, !&#C&&* #7& f$-#
#$!(&,.
1unk Dimension: T7& D)m&*,)o* #$!(&D C7)-7 -o*#$)*, o*(1 f($%,.
Monster Dimension: If r$+)/(1 -7$*%&, )* D)m&*,)o* $r& ;*oC* $, .o*,#&r D)m&*,)o*.
De-generative Dimension: I# ), ()*& )#&m5or)&*#&/ f$-# #$!(& /&,)%*.
Q 32 What are stage variables?
S#$%& 0$r)$!(&, $r& /&-($r$#)0&, )* Tr$*,form&r S#$%& ",&/ #o ,#or& 0$("&,. S#$%& 0$r)$!(&,
$r& $-#)0& $# #7& r"* #)m&. I4&-$",& m&mor1 ), $((o-$#&/ $# #7& r"* #)m&B.
Q 33 What is sequencer?
I# ,&#, #7& ,&9"&*-& of &?&-"#)o* of ,&r0&r 2o!,.
Page 8 of 243
Q 34 What are Active and Passive stages?
Active Stage: A-#)0& ,#$%& mo/&( #7& f(oC of /$#$ $*/ +ro0)/& m&-7$*),m, for -om!)*)*%
/$#$ ,#r&$m,D $%%r&%$#)*% /$#$ $*/ -o*0&r#)*% /$#$ from o*& /$#$ #1+& #o $*o#7&r. E%D
Tr$*,form&rD $%%r&%$#orD ,or#D RoC .&r%&r &#-.
Passive Stage: A P$,,)0& ,#$%& 7$*/(&, $--&,, #o D$#$!$,& for #7& &?#r$-#)o* or Cr)#)*% of
/$#$. E%D IP' ,#$%&D F)(& #1+&,D U*)0&r,&D U*)/$#$D DRS ,#$%& &#-.
Q 35 What is ODS?
O+&r$#)o*$( D$#$ S#or& ), $ ,#$%)*% $r&$ C7&r& /$#$ -$* !& ro((&/ !$-;.
Q 36 What are Macros?
T7&1 $r& !")(# from D$#$ S#$%& f"*-#)o*, $*/ /o *o# r&9")r& $r%"m&*#,.
A *"m!&r of m$-ro, $r& +ro0)/&/ )* #7& 3O4'ONTRO.H f)(& #o f$-)()#$#& %&##)*%
)*form$#)o* $!o"# #7& -"rr&*# 2o!D $*/ ()*;, $*/ ,#$%&, !&(o*%)*% #o #7& -"rr&*# 2o!. T7&,&
-$* !& ",&/ )* &?+r&,,)o*, Ifor &?$m+(& for ",& )* Tr$*,form&r ,#$%&,BD 2o! -o*#ro(
ro"#)*&,D f)(&*$m&, $*/ #$!(& *$m&,D $*/ !&for&J$f#&r ,"!ro"#)*&,.
T7&,& m$-ro, +ro0)/& #7& f"*-#)o*$()#1 of ",)*% #7& DSG&#Pro2&-#I*foD DSG&#3o!I*foD
DSG&#S#$%&I*foD $*/ DSG&#)*;I*fo f"*-#)o*, C)#7 #7& DS3..E #o;&* $, #7& JobHandle
$*/ -$* !& ",&/ )* $(( $-#)0& ,#$%&, $*/ !&for&J$f#&r ,"!ro"#)*&,. T7& m$-ro, +ro0)/& #7&
f"*-#)o*$()#1 for $(( #7& +o,,)!(& InfoType $r%"m&*#, for #7& DSGet.Info f"*-#)o*,. S&&
#7& F"*-#)o* -$(( 7&(+ #o+)-, for mor& /&#$)(,.
T7& $0$)($!(& m$-ro, $r&= DSHostName
DSProjectName
DS1obStatus
DS1obName
DS1obController
DS1obStartDate
DS1obStartTime
DS1obStartTimestamp
DS1obWaveNo
DS1obInvocations
DS1obInvocationId
DSStageName
DSStageLastErr
DSStageType
DSStageInRowNum
DSStageVarList
DSLinkRowCount
DSLinkLastErr
DSLinkName
1) Examples
2) To obtain the name of the current job:
Page 9 of 243
3) MyName = D!obName
To o!#$)* #7& f"(( -"rr&*# ,#$%& *$m&=
.1N$m& O DS3o!N$m& = . = DSS#$%&N$m&
Q 37 What is keyMgtGetNextValue?
I# ), $ 4")(#5)* #r$*,form )# %&*&r$#&, S&9"&*#)$( *"m!&r,. I#, )*+"# #1+& ), ()#&r$( ,#r)*% @
o"#+"# #1+& ), ,#r)*%.
Q 38 What are stages?
T7& ,#$%&, $r& &)#7&r +$,,)0& or $-#)0& ,#$%&,.
Passive stages 7$*/(& $--&,, #o /$#$!$,&, for &?#r$-#)*% or Cr)#)*% /$#$. Active
stages mo/&( #7& f(oC of /$#$ $*/ +ro0)/& m&-7$*),m, for -om!)*)*% /$#$ ,#r&$m,D
$%%r&%$#)*% /$#$D $*/ -o*0&r#)*% /$#$ from o*& /$#$ #1+& #o $*o#7&r.
Q 39 What index is created on Data Warehouse?
4)#m$+ )*/&? ), -r&$#&/ )* D$#$ W$r&7o",&.
Q 40 What is container?
A -o*#$)*&r ), $ %ro"+ of ,#$%&, $*/ ()*;,. 'o*#$)*&r, &*$!(& 1o" #o ,)m+()f1 $*/
mo/"($r)E& 1o"r ,&r0&r 2o! /&,)%*, !1 r&+($-)*% -om+(&? $r&$, of #7& /)$%r$m C)#7 $
,)*%(& -o*#$)*&r ,#$%&. >o" -$* $(,o ",& ,7$r&/ -o*#$)*&r, $, $ C$1 of )*-or+or$#)*% ,&r0&r
2o! f"*-#)o*$()#1 )*#o +$r$((&( 2o!,.
D$#$S#$%& +ro0)/&, #Co #1+&, of -o*#$)*&r=
Local containers. T7&,& $r& -r&$#&/ C)#7)* $ 2o! $*/ $r& o*(1 $--&,,)!(& !1 #7$#
2o!. A (o-$( -o*#$)*&r ), &/)#&/ )* $ #$!!&/ +$%& of #7& 2o!G, D)$%r$m C)*/oC.
Shared containers. T7&,& $r& -r&$#&/ ,&+$r$#&(1 $*/ $r& ,#or&/ )* #7& R&+o,)#or1
)* #7& ,$m& C$1 #7$# 2o!, $r&. T7&r& $r& #Co #1+&, of ,7$r&/ -o*#$)*&r
Q 41 What is function? ( 1ob Control - Examples of Transform Functions )
F"*-#)o*, #$;& $r%"m&*#, $*/ r&#"r* $ 0$("&.
BASIC functions: A f"*-#)o* +&rform, m$#7&m$#)-$( or ,#r)*% m$*)+"($#)o*, o*
#7& $r%"m&*#, ,"++()&/ #o )#D $*/ r&#"r* $ 0$("&. Som& f"*-#)o*, 7$0& 0 $r%"m&*#,P
mo,# 7$0& 1 or mor&. Ar%"m&*#, $r& $(C$1, )* +$r&*#7&,&,D ,&+$r$#&/ !1 -omm$,D
$, ,7oC* )* #7), %&*&r$( ,1*#$?=
F"*-#)o*N$m& (argument, argument)
DataStage BASIC functions: T7&,& f"*-#)o*, -$* !& ",&/ )* $ 2o! -o*#ro(
ro"#)*&D C7)-7 ), /&f)*&/ $, +$r# of $ 2o!G, +ro+&r#)&, $*/ $((oC, o#7&r 2o!, #o !&
r"* $*/ -o*#ro((&/ from #7& f)r,# 2o!. Som& of #7& f"*-#)o*, -$* $(,o !& ",&/ for
%&##)*% ,#$#", )*form$#)o* o* #7& -"rr&*# 2o!P #7&,& $r& ",&f"( )* $-#)0& ,#$%&
&?+r&,,)o*, $*/ !&for&5 $*/ $f#&r5,#$%& ,"!ro"#)*&,.
To do this ... Use this function ...
S+&-)f1 #7& 2o! 1o" C$*# #o -o*#ro( DSA##$-73o!
S&# +$r$m&#&r, for #7& 2o! 1o" C$*# #o -o*#ro( DSS&#P$r$m
Page 10 of 243
S&# ()m)#, for #7& 2o! 1o" C$*# #o -o*#ro( DSS&#3o!)m)#
R&9"&,# #7$# $ 2o! ), r"* DSR"*3o!
W$)# for $ -$((&/ 2o! #o f)*),7 DSW$)#For3o!
G&#, #7& m&#$ /$#$ /&#$)(, for #7& ,+&-)f)&/ ()*; DSG&#)*;.&#$D$#$
G&# )*form$#)o* $!o"# #7& -"rr&*# +ro2&-# DSG&#Pro2&-#I*fo
G&# !"ff&r ,)E& $*/ #)m&o"# 0$("& for $* IP' or W&! S&r0)-&
,#$%&
DSG&#IP'S#$%&Pro+,
G&# )*form$#)o* $!o"# #7& -o*#ro((&/ 2o! or -"rr&*# 2o! DSG&#3o!I*fo
G&# )*form$#)o* $!o"# #7& m&#$ !$% +ro+&r#)&, $,,o-)$#&/ C)#7
#7& *$m&/ 2o!
DSG&#3o!.&#$4$%
G&# )*form$#)o* $!o"# $ ,#$%& )* #7& -o*#ro((&/ 2o! or -"rr&*#
2o!
DSG&#S#$%&I*fo
G&# #7& *$m&, of #7& ()*;, $##$-7&/ #o #7& ,+&-)f)&/ ,#$%& DSG&#S#$%&)*;,
G&# $ (),# of ,#$%&, of $ +$r#)-"($r #1+& )* $ 2o!. DSG&#S#$%&,OfT1+&
G&# )*form$#)o* $!o"# #7& #1+&, of ,#$%& )* $ 2o!. DSG&#S#$%&T1+&,
G&# )*form$#)o* $!o"# $ ()*; )* $ -o*#ro((&/ 2o! or -"rr&*# 2o! DSG&#)*;I*fo
G&# )*form$#)o* $!o"# $ -o*#ro((&/ 2o!G, +$r$m&#&r, DSG&#P$r$mI*fo
G&# #7& (o% &0&*# from #7& 2o! (o% DSG&#o%E*#r1
G&# $ *"m!&r of (o% &0&*#, o* #7& ,+&-)f)&/ ,"!2&-# from #7&
2o! (o%
DSG&#o%S"mm$r1
G&# #7& *&C&,# (o% &0&*#D of $ ,+&-)f)&/ #1+&D from #7& 2o! (o% DSG&#N&C&,#o%I/
o% $* &0&*# #o #7& 2o! (o% of $ /)ff&r&*# 2o! DSo%E0&*#
S#o+ $ -o*#ro((&/ 2o! DSS#o+3o!
R&#"r* $ 2o! 7$*/(& +r&0)o",(1 o!#$)*&/ from DSAttach1ob DSD&#$-73o!
o% $ f$#$( &rror m&,,$%& )* $ 2o!Q, (o% f)(& $*/ $!or#, #7& 2o!. DSo%F$#$(
o% $* )*form$#)o* m&,,$%& )* $ 2o!Q, (o% f)(&. DSo%I*fo
P"# $* )*fo m&,,$%& )* #7& 2o! (o% of $ 2o! -o*#ro(()*% -"rr&*#
2o!.
DSo%To'o*#ro((&r
o% $ C$r*)*% m&,,$%& )* $ 2o!Q, (o% f)(&. DSo%W$r*
G&*&r$#& $ ,#r)*% /&,-r)!)*% #7& -om+(&#& ,#$#", of $ 0$()/
$##$-7&/ 2o!.
DS.$;&3o!R&+or#
I*,&r# $r%"m&*#, )*#o #7& m&,,$%& #&m+($#&. DS.$;&.,%
E*,"r& $ 2o! ), )* #7& -orr&-# ,#$#& #o !& r"* or 0$()/$#&/. DSPr&+$r&3o!
I*#&rf$-& #o ,1,#&m ,&*/ m$)( f$-)()#1. DSS&*/.$)(
Page 11 of 243
o% $ C$r*)*% m&,,$%& #o $ 2o! (o% f)(&. DSTr$*,formError
'o*0&r# $ 2o! -o*#ro( ,#$#", or &rror -o/& )*#o $* &?+($*$#or1
#&?# m&,,$%&.
DSTr$*,($#&'o/&
S",+&*/ $ 2o! "*#)( $ *$m&/ f)(& &)#7&r &?),#, or /o&, *o# &?),#. DSW$)#ForF)(&
'7&-;, )f $ 4ASI' ro"#)*& ), -$#$(o%&/D &)#7&r )* VO' $, $
-$(($!(& )#&mD or )* #7& -$#$(o% ,+$-&.
DS'7&-;Ro"#)*&
E?&-"#& $ DOS or D$#$ S#$%& E*%)*& -omm$*/ from $
!&for&J$f#&r ,"!ro"#)*&.
DSE?&-"#&
S&# $ ,#$#", m&,,$%& for $ 2o! #o r&#"r* $, $ #&rm)*$#)o*
m&,,$%& C7&* )# f)*),7&,
DSS&#U,&rS#$#",
Q 42 What is Routines?
Ro"#)*&, $r& ,#or&/ )* #7& Routines !r$*-7 of #7& D$#$ S#$%& R&+o,)#or1D C7&r& 1o" -$*
-r&$#&D 0)&C or &/)#. T7& fo((oC)*% +ro%r$mm)*% -om+o*&*#, $r& -($,,)f)&/ $, ro"#)*&,=
Tr$*,form f"*-#)o*,D 4&for&JAf#&r ,"!ro"#)*&,D '",#om U*)V&r,& f"*-#)o*,D A-#)0&H
IOEB f"*-#)o*,D W&! S&r0)-& ro"#)*&,
Q 43 What is data stage Transform?
Q 44 What is Meta Brokers?
Q 45 What is usage analysis?
Q 46 What is job sequencer?
Q 47 What are different activities in job sequencer?
Q 48 What are triggers in data Stages? (conditional, unconditional, otherwise)
Q 49 Are u generated job Reports? S
Q 50 What is plug-in?
Q 51 Have u created any custom transform? Explain? (Oconv)
Page 12 of 243
DATASTAGE FAQ from GEEK INTERVIEW QUESTIONS
Question: Dimension Modeling types along with their significance
Answer:
D$#$ .o/&(()*% ), !ro$/(1 -($,,)f)&/ )*#o 2 #1+&,.
AB E5R D)$%r$m, IE*#)#1 5 R&($#)o,7)+,B.
4B D)m&*,)o*$( .o/&(()*%.
Question: Dimensional modelling is again sub divided into 2 types.
Answer:
AB S#$r S-7&m$ 5 S)m+(& @ ."-7 F$,#&r. D&*orm$()E&/ form.
4B S*oCf($;& S-7&m$ 5 'om+(&? C)#7 mor& Gr$*"($r)#1. .or& *orm$()E&/ form.
Question: Importance of Surrogate Key in Data warehousing?
Answer:
S"rro%$#& K&1 ), $ Pr)m$r1 K&1 for $ D)m&*,)o* #$!(&. .o,# )m+or#$*-& of ",)*% )# ),D )# ),
)*/&+&*/&*# of "*/&r(1)*% /$#$!$,&D ).&. S"rro%$#& K&1 ), *o# $ff&-#&/ !1 #7& -7$*%&,
%o)*% o* C)#7 $ /$#$!$,&.
Question: Differentiate Database data and Data warehouse data?
Answer:
D$#$ )* $ D$#$!$,& ),
AB D&#$)(&/ or Tr$*,$-#)o*$(
4B 4o#7 R&$/$!(& $*/ Wr)#$!(&.
'B '"rr&*#.
Question: What is the flow of loading data into fact & dimensional tables?
Answer:
Page 13 of 243
F$-# #$!(& 5 T$!(& C)#7 'o((&-#)o* of For&)%* K&1, -orr&,+o*/)*% #o #7& Pr)m$r1 K&1, )*
D)m&*,)o*$( #$!(&. 'o*,),#, of f)&(/, C)#7 *"m&r)- 0$("&,.
D)m&*,)o* #$!(& 5 T$!(& C)#7 U*)9"& Pr)m$r1 K&1.
o$/ 5 D$#$ ,7o"(/ !& f)r,# (o$/&/ )*#o /)m&*,)o*$( #$!(&. 4$,&/ o* #7& +r)m$r1 ;&1
0$("&, )* /)m&*,)o*$( #$!(&D #7&* /$#$ ,7o"(/ !& (o$/&/ )*#o F$-# #$!(&.
Question: Orchestrate Vs Datastage Parallel Extender?
Answer:
Or-7&,#r$#& )#,&(f ), $* ET #oo( C)#7 &?#&*,)0& +$r$((&( +ro-&,,)*% -$+$!)()#)&, $*/
r"**)*% o* UNIH +($#form. D$#$,#$%& ",&/ Or-7&,#r$#& C)#7 D$#$,#$%& HE I4&#$ 0&r,)o*
of 6.0B #o )*-or+or$#& #7& +$r$((&( +ro-&,,)*% -$+$!)()#)&,. NoC D$#$,#$%& 7$, +"r-7$,&/
Or-7&,#r$#& $*/ )*#&%r$#&/ )# C)#7 D$#$,#$%& HE $*/ r&(&$,&/ $ *&C 0&r,)o* D$#$,#$%& 6.0
).&. P$r$((&( E?#&*/&r.
Question: Differentiate Primary Key and Partition Key?
Answer:
Pr)m$r1 K&1 ), $ -om!)*$#)o* of "*)9"& $*/ *o# *"((. I# -$* !& $ -o((&-#)o* of ;&1 0$("&,
-$((&/ $, -om+o,)#& +r)m$r1 ;&1. P$r#)#)o* K&1 ), $ 2",# $ +$r# of Pr)m$r1 K&1. T7&r& $r&
,&0&r$( m&#7o/, of +$r#)#)o* ();& H$,7D D42D R$*/om &#-...W7)(& ",)*% H$,7 +$r#)#)o* C&
,+&-)f1 #7& P$r#)#)o* K&1.
Question: What are Stage Variables, Derivations and Constants?
Answer:
S#$%& V$r)$!(& 5 A* )*#&rm&/)$#& +ro-&,,)*% 0$r)$!(& #7$# r&#$)*, 0$("& /"r)*% r&$/ $*/
/o&,*G# +$,, #7& 0$("& )*#o #$r%&# -o("m*.
'o*,#r$)*# 5 'o*/)#)o*, #7$# $r& &)#7&r #r"& or f$(,& #7$# ,+&-)f)&, f(oC of /$#$ C)#7 $ ()*;.
D&r)0$#)o* 5 E?+r&,,)o* #7$# ,+&-)f)&, 0$("& #o !& +$,,&/ o* #o #7& #$r%&# -o("m*.
Question: What is the default cache size? How do you change the cache size if
needed?
Answer:
D&f$"(# -$-7& ,)E& ), 256 .4. W& -$* )*-r&$,& )# !1 %o)*% )*#o D$#$,#$%& A/m)*),#r$#or
$*/ ,&(&-#)*% #7& T"*$!(& T$! $*/ ,+&-)f1 #7& -$-7& ,)E& o0&r #7&r&.
Question: What is Hash file stage and what is it used for?
Answer:
U,&/ for oo;5"+,. I# ), ();& $ r&f&r&*-& #$!(&. I# ), $(,o ",&/ )*5+($-& of OD4'D O'I
#$!(&, for !&##&r +&rform$*-&.
Question: What are types of Hashed File?
Answer:
H$,7&/ F)(& ), -($,,)f)&/ !ro$/(1 )*#o 2 #1+&,.
AB S#$#)- 5 S"! /)0)/&/ )*#o 18 #1+&, !$,&/ o* Pr)m$r1 K&1 P$##&r*.
4B D1*$m)- 5 ,"! /)0)/&/ )*#o 2 #1+&,
)B G&*&r)-
))B S+&-)f)-
D&f$"(# H$,&/ f)(& ), FD1*$m)- 5 T1+& R$*/om 30 DF

Page 14 of 243
Question: What are Static Hash files and Dynamic Hash files?
Answer:
A, #7& *$m&, )#,&(f ,"%%&,# C7$# #7&1 m&$*. I* %&*&r$( C& ",& T1+&530 /1*$m)- H$,7
f)(&,. T7& D$#$ f)(& 7$, $ /&f$"(# ,)E& of 2G4 $*/ #7& o0&rf(oC f)(& ), ",&/ )f #7& /$#$
&?-&&/, #7& 2G4 ,)E&.
Question: What is the Usage of Containers? What are its types?
Answer:
'o*#$)*&r ), $ -o((&-#)o* of ,#$%&, ",&/ for #7& +"r+o,& of R&",$!)()#1.
T7&r& $r& 2 #1+&, of 'o*#$)*&r,.
AB o-$( 'o*#$)*&r= 3o! S+&-)f)-
4B S7$r&/ 'o*#$)*&r= U,&/ )* $*1 2o! C)#7)* $ +ro2&-#.
Question: Compare and Contrast ODBC and Plug-In stages?
Answer:
ODBC PLUG-IN
Poor P&rform$*-& Goo/ P&rform$*-&
'$* !& ",&/ for V$r)&#1 of D$#$!$,&, D$#$!$,& S+&-)f)- Io*(1 o*& /$#$!$,&B
'$* 7$*/(& S#or&/ Pro-&/"r&, '$**o# 7$*/(& S#or&/ Pro-&/"r&,
Question: How do you execute datastage job from command line prompt?
Answer:
U,)*% F/,2o!F -omm$*/ $, fo((oC,.
/,2o! 5r"* 52o!,#$#", +ro2&-#*$m& 2o!*$m&
Question: What are the command line functions that import and export the DS jobs?
Answer:
/,)m+or#.&?& 5 )m+or#, #7& D$#$S#$%& -om+o*&*#,.
/,&?+or#.&?& 5 &?+or#, #7& D$#$S#$%& -om+o*&*#,.
Question: How to run a Shell Script within the scope of a Data stage job?
Answer:
41 ",)*% FE?-&-SHF -omm$*/ $# 4&for&JAf#&r 2o! +ro+&r#)&,.

Question: What are OConv () and Iconv () functions and where are they used?
Answer:
I'o*0IB 5 'o*0&r#, $ ,#r)*% #o $* )*#&r*$( ,#or$%& form$#
O'o*0IB 5 'o*0&r#, $* &?+r&,,)o* #o $* o"#+"# form$#.
Question: How to handle Date convertions in Datastage? Convert mm/dd/yyyy
format to yyyy-dd-mm?
Answer:
W& ",&
$B FI-o*0F f"*-#)o* 5 I*#&r*$( 'o*0&r#)o*.
!B FO-o*0F f"*-#)o* 5 E?#&r*$( 'o*0&r#)o*.
F"*-#)o* #o -o*0&r# mmJ//J1111 form$# #o 11115//5mm ),
O-o*0II-o*0IF)(&/*$m&DFDJ.D>K2D2D4LFBDFD5.D>K2D2D4LFB
Page 15 of 243

Question: Types of Parallel Processing?
Answer:
P$r$((&( Pro-&,,)*% ), !ro$/(1 -($,,)f)&/ )*#o 2 #1+&,.
$B S.P 5 S1mm&#r)-$( ."(#) Pro-&,,)*%.
!B .PP 5 .$,,)0& P$r$((&( Pro-&,,)*%.

Question: What does a Config File in parallel extender consist of?
Answer:
'o*f)% f)(& -o*,),#, of #7& fo((oC)*%.
$B N"m!&r of Pro-&,,&, or No/&,.
!B A-#"$( D),; S#or$%& o-$#)o*.

Question: Functionality of Link Partitioner and Link Collector?
Answer:
)*; P$r#)#)o*&r= I# $-#"$((1 ,+()#, /$#$ )*#o 0$r)o", +$r#)#)o*, or /$#$ f(oC, ",)*% 0$r)o",
P$r#)#)o* m&#7o/,.
)*; 'o((&-#or= I# -o((&-#, #7& /$#$ -om)*% from +$r#)#)o*,D m&r%&, )# )*#o $ ,)*%(& /$#$
f(oC $*/ (o$/, #o #$r%&#.

Question: What is Modulus and Splitting in Dynamic Hashed File?
Answer:
I* $ H$,7&/ F)(&D #7& ,)E& of #7& f)(& ;&&+, -7$*%)*% r$*/om(1.
If #7& ,)E& of #7& f)(& )*-r&$,&, )# ), -$((&/ $, F.o/"(",F.
If #7& ,)E& of #7& f)(& /&-r&$,&, )# ), -$((&/ $, FS+()##)*%F.
Question: Types of views in Datastage Director?
Answer:
T7&r& $r& 3 #1+&, of 0)&C, )* D$#$,#$%& D)r&-#or
$B 3o! V)&C 5 D$#&, of 3o!, 'om+)(&/.
!B o% V)&C 5 S#$#", of 3o! ($,# R"*
-B S#$#", V)&C 5 W$r*)*% .&,,$%&,D E0&*# .&,,$%&,D Pro%r$m G&*&r$#&/ .&,,$%&,.

Question: Did you Parameterize the job or hard-coded the values in the jobs?
Answer:
A(C$1, +$r$m&#&r)E&/ #7& 2o!. E)#7&r #7& 0$("&, $r& -om)*% from 3o! Pro+&r#)&, or from $
RP$r$m&#&r .$*$%&rG 6 $ #7)r/ +$r# #oo(. T7&r& ), *o C$1 1o" C)(( 7$r/6-o/& ,om&
+$r$m&#&r, )* 1o"r 2o!,. T7& of#&* P$r$m&#&r)E&/ 0$r)$!(&, )* $ 2o! $r&= D4 DSN *$m&D
",&r*$m&D +$,,Cor/D /$#&, W.R.T for #7& /$#$ #o !& (oo;&/ $%$)*,# $#.
Question: Have you ever involved in updating the DS versions like DS 5.X, if so tell
us some the steps you have taken in doing so?
Answer:
>&,.
T7& fo((oC)*% $r& ,om& of #7& ,#&+,=
D&f)*)#&(1 #$;& $ !$-; "+ of #7& C7o(& +ro2&-#I,B !1 &?+or#)*% #7& +ro2&-# $, $ ./,? f)(&
Page 16 of 243
S&& #7$# 1o" $r& ",)*% #7& ,$m& +$r&*# fo(/&r for #7& *&C 0&r,)o* $(,o for 1o"r o(/ 2o!,
",)*% #7& 7$r/5-o/&/ f)(& +$#7 #o Cor;.
Af#&r )*,#$(()*% #7& *&C 0&r,)o* )m+or# #7& o(/ +ro2&-#I,B $*/ 1o" 7$0& #o -om+)(& #7&m $((
$%$)*. >o" -$* ",& Q'om+)(& A((Q #oo( for #7),.
.$;& ,"r& #7$# $(( 1o"r D4 DSNQ, $r& -r&$#&/ C)#7 #7& ,$m& *$m& $, o(/ o*&,. T7), ,#&+ ),
for mo0)*% DS from o*& m$-7)*& #o $*o#7&r.
I* -$,& )f 1o" $r& 2",# "+%r$/)*% 1o"r D4 from Or$-(& :) #o Or$-(& <) #7&r& ), #oo( o* DS
'D #7$# -$* /o #7), for 1o".
Do *o# ,#o+ #7& 6.0 ,&r0&r !&for& #7& "+%r$/&D 0&r,)o* 8.0 )*,#$(( +ro-&,, -o((&-#, +ro2&-#
)*form$#)o* /"r)*% #7& "+%r$/&. T7&r& ), NO r&Cor; Ir&-om+)($#)o* of &?),#)*%
2o!,Jro"#)*&,B *&&/&/ $f#&r #7& "+%r$/&.
Question: How did you handle reject data?
Answer:
T1+)-$((1 $ R&2&-#5()*; ), /&f)*&/ $*/ #7& r&2&-#&/ /$#$ ), (o$/&/ !$-; )*#o /$#$ C$r&7o",&.
So R&2&-# ()*; 7$, #o !& /&f)*&/ &0&r1 O"#+"# ()*; 1o" C),7 #o -o((&-# r&2&-#&/ /$#$.
R&2&-#&/ /$#$ ), #1+)-$((1 !$/ /$#$ ();& /"+()-$#&, of Pr)m$r1 ;&1, or *"((5roC, C7&r& /$#$
), &?+&-#&/.
Question: What are other Performance tunings you have done in your last project to
increase the performance of slowly running jobs?
Answer:
S#$%&/ #7& /$#$ -om)*% from OD4'JO'IJD42UD4 ,#$%&, or $*1 /$#$!$,& o* #7&
,&r0&r ",)*% H$,7JS&9"&*#)$( f)(&, for o+#)m"m +&rform$*-& $(,o for /$#$ r&-o0&r1 )*
-$,& 2o! $!or#,.
T"*&/ #7& O'I ,#$%& for QArr$1 S)E&Q $*/ QRoC, +&r Tr$*,$-#)o*Q *"m&r)-$( 0$("&,
for f$,#&r )*,&r#,D "+/$#&, $*/ ,&(&-#,.
T"*&/ #7& QPro2&-# T"*$!(&,Q )* A/m)*),#r$#or for !&##&r +&rform$*-&.
U,&/ ,or#&/ /$#$ for A%%r&%$#or.
Sor#&/ #7& /$#$ $, m"-7 $, +o,,)!(& )* D4 $*/ r&/"-&/ #7& ",& of DS5Sor# for
!&##&r +&rform$*-& of 2o!,.
R&mo0&/ #7& /$#$ *o# ",&/ from #7& ,o"r-& $, &$r(1 $, +o,,)!(& )* #7& 2o!.
Wor;&/ C)#7 D45$/m)* #o -r&$#& $++ro+r)$#& I*/&?&, o* #$!(&, for !&##&r
+&rform$*-& of DS 9"&r)&,.
'o*0&r#&/ ,om& of #7& -om+(&? 2o)*,J!",)*&,, )* DS #o S#or&/ Pro-&/"r&, o* DS
for f$,#&r &?&-"#)o* of #7& 2o!,.
If $* )*+"# f)(& 7$, $* &?-&,,)0& *"m!&r of roC, $*/ -$* !& ,+()#5"+ #7&* ",&
,#$*/$r/ (o%)- #o r"* 2o!, )* +$r$((&(.
4&for& Cr)#)*% $ ro"#)*& or $ #r$*,formD m$;& ,"r& #7$# #7&r& ), *o# #7&
f"*-#)o*$()#1 r&9")r&/ )* o*& of #7& ,#$*/$r/ ro"#)*&, ,"++()&/ )* #7& ,/; or /, "#)()#)&,
-$#&%or)&,.
'o*,#r$)*#, $r& %&*&r$((1 'PU )*#&*,)0& $*/ #$;& $ ,)%*)f)-$*# $mo"*# of #)m& #o
+ro-&,,. T7), m$1 !& #7& -$,& )f #7& -o*,#r$)*# -$((, ro"#)*&, or &?#&r*$( m$-ro, !"# )f )#
), )*()*& -o/& #7&* #7& o0&r7&$/ C)(( !& m)*)m$(.
Tr1 #o 7$0& #7& -o*,#r$)*#, )* #7& QS&(&-#)o*Q -r)#&r)$ of #7& 2o!, )#,&(f. T7), C)((
&()m)*$#& #7& "**&-&,,$r1 r&-or/, &0&* %&##)*% )* !&for& 2o)*, $r& m$/&.
Page 17 of 243
T"*)*% ,7o"(/ o--"r o* $ 2o!5!152o! !$,),.
U,& #7& +oC&r of D4.S.
Tr1 *o# #o ",& $ ,or# ,#$%& C7&* 1o" -$* ",& $* ORDER 4> -($",& )* #7&
/$#$!$,&.
U,)*% $ -o*,#r$)*# #o f)(#&r $ r&-or/ ,&# ), m"-7 ,(oC&r #7$* +&rform)*% $ SEE'T
S WHERES.
.$;& &0&r1 $##&m+# #o ",& #7& !"(; (o$/&r for 1o"r +$r#)-"($r /$#$!$,&. 4"(;
(o$/&r, $r& %&*&r$((1 f$,#&r #7$* ",)*% OD4' or OE.
Question: Tell me one situation from your last project, where you had faced problem
and How did u solve it?
Answer:
1. T7& 2o!, )* C7)-7 /$#$ ), r&$/ /)r&-#(1 from O'I ,#$%&, $r& r"**)*% &?#r&m&(1
,(oC. I 7$/ #o ,#$%& #7& /$#$ !&for& ,&*/)*% #o #7& #r$*,form&r #o m$;& #7& 2o!, r"*
f$,#&r.
2. T7& 2o! $!or#, )* #7& m)//(& of (o$/)*% ,om& 500D000 roC,. H$0& $* o+#)o* &)#7&r
-(&$*)*%J/&(&#)*% #7& (o$/&/ /$#$ $*/ #7&* r"* #7& f)?&/ 2o! or r"* #7& 2o! $%$)* from
#7& roC #7& 2o! 7$, $!or#&/. To m$;& ,"r& #7& (o$/ ), +ro+&r C& o+#&/ #7& form&r.
Question: Tell me the environment in your last projects
Answer:
G)0& #7& OS of #7& S&r0&r $*/ #7& OS of #7& '()&*# of 1o"r r&-&*# mo,# +ro2&-#
Question: How did u connect with DB2 in your last project?
Answer:
.o,# of #7& #)m&, #7& /$#$ C$, ,&*# #o ", )* #7& form of f($# f)(&,. T7& /$#$ ), /"m+&/ $*/
,&*# #o ",. I* ,om& -$,&, C&r& C& *&&/ #o -o**&-# #o D42 for (oo;5"+, $, $* )*,#$*-& #7&*
C& ",&/ ODBC drivers to connect to DB2 IorB D425UD4 /&+&*/)*% #7& ,)#"$#)o* $*/
$0$)($!)()#1. '&r#$)*(1 D425UD4 ), !&##&r )* #&rm, of +&rform$*-& $, 1o" ;*oC #7& *$#)0&
/r)0&r, $r& $(C$1, !&##&r #7$* OD4' /r)0&r,. Q)S&r)&, A--&,, OD4' Dr)0&r <.00.02.02Q 5
OD4' /r)0&r, #o -o**&-# #o AS400JD42.
Question: What are Routines and where/how are they written and have you written
any routines before?
Answer:
Ro"#)*&, $r& ,#or&/ )* #7& Ro"#)*&, !r$*-7 of #7& D$#$S#$%& R&+o,)#or1D C7&r& 1o" -$*
-r&$#&D 0)&C or &/)#.
T7& fo((oC)*% $r& /)ff&r&*# #1+&, of Ro"#)*&,=
1. Tr$*,form F"*-#)o*,
2. 4&for&5Af#&r 3o! ,"!ro"#)*&,
3. 3o! 'o*#ro( Ro"#)*&,
Question: How did you handle an 'Aborted' sequencer?
Answer:
I* $(mo,# $(( -$,&, C& 7$0& #o /&(&#& #7& /$#$ )*,&r#&/ !1 #7), from D4 m$*"$((1 $*/ f)?
#7& 2o! $*/ #7&* r"* #7& 2o! $%$)*.
Question: What are Sequencers?
Page 18 of 243
Answer:
S&9"&*-&r, $r& 2o! -o*#ro( +ro%r$m, #7$# &?&-"#& o#7&r 2o!, C)#7 +r&,&# 3o! +$r$m&#&r,.
Question: Read the String functions in DS
Answer:
F"*-#)o*, ();& KL 5T ,"!5,#r)*% f"*-#)o* $*/ Q=Q 5T -o*-$#&*$#)o* o+&r$#or
S1*#$?=
,#r)*% K K ,#$r#D L (&*%#7 L
,#r)*% K /&()m)#&rD )*,#$*-&D r&+&$#, L

Question: What will you in a situation where somebody wants to send you a file and
use that file as an input or reference and then run job.
Answer:
U*/&r W)*/oC, = U,& #7& QW$)#ForF)(&A-#)0)#1Q "*/&r #7& S&9"&*-&r, $*/ #7&* r"*
#7& 2o!. .$1 !& 1o" -$* ,-7&/"(& #7& ,&9"&*-&r $ro"*/ #7& #)m& #7& f)(& ), &?+&-#&/ #o
$rr)0&.
U*/&r UNIH = Po(( for #7& f)(&. O*-& #7& f)(& 7$, ,#$r# #7& 2o! or ,&9"&*-&r
/&+&*/)*% o* #7& f)(&.
Question: What is the utility you use to schedule the jobs on a UNIX server other
than using Ascential Director?
Answer:
U,& -ro*#$! "#)()#1 $(o*% C)#7 /,&?&-"#&IB f"*-#)o* $(o*% C)#7 +ro+&r +$r$m&#&r, +$,,&/.
Question: Did you work in UNIX environment?
Answer:
>&,. O*& of #7& mo,# )m+or#$*# r&9")r&m&*#,.
Question: How would call an external 1ava function which are not supported by
DataStage?
Answer:
S#$r#)*% from DS 6.0 C& 7$0& #7& $!)()#1 #o -$(( &?#&r*$( 3$0$ f"*-#)o*, ",)*% $ 3$0$
+$-;$%& from A,-&*#)$(. I* #7), -$,& C& -$* &0&* ",& #7& -omm$*/ ()*& #o )*0o;& #7& 3$0$
f"*-#)o* $*/ Cr)#& #7& r&#"r* 0$("&, from #7& 3$0$ +ro%r$m I)f $*1B $*/ ",& #7$# f)(&, $, $
,o"r-& )* D$#$S#$%& 2o!.
Question: How will you determine the sequence of jobs to load into data warehouse?
Answer:
F)r,# C& &?&-"#& #7& 2o!, #7$# (o$/ #7& /$#$ )*#o D)m&*,)o* #$!(&,D #7&* F$-# #$!(&,D #7&*
(o$/ #7& A%%r&%$#or #$!(&, I)f $*1B.
Question: The above might raise another question: Why do we have to load the
dimensional tables first, then fact tables:
Answer:
A, C& (o$/ #7& /)m&*,)o*$( #$!(&, #7& ;&1, I+r)m$r1B $r& %&*&r$#&/ $*/ #7&,& ;&1,
I+r)m$r1B $r& For&)%* ;&1, )* F$-# #$!(&,.
Page 19 of 243
Question: Does the selection of 'Clear the table and Insert rows' in the ODBC stage
send a Truncate statement to the DB or does it do some kind of Delete logic.
Answer:
T7&r& ), *o TRUN'ATE o* OD4' ,#$%&,. I# ), '(&$r #$!(& !($7 !($7 $*/ #7$# ), $ /&(&#&
from ,#$#&m&*#. O* $* O'I ,#$%& ,"-7 $, Or$-(&D 1o" /o 7$0& !o#7 '(&$r $*/ Tr"*-$#&
o+#)o*,. T7&1 $r& r$/)-$((1 /)ff&r&*# )* +&rm),,)o*, ITr"*-$#& r&9")r&, 1o" #o 7$0& $(#&r
#$!(& +&rm),,)o*, C7&r& D&(&#& /o&,*Q#B.
Question: How do you rename all of the jobs to support your new File-naming
conventions?
Answer:
'r&$#& $* E?-&( ,+r&$/,7&&# C)#7 *&C $*/ o(/ *$m&,. E?+or# #7& C7o(& +ro2&-# $, $ /,?.
Wr)#& $ P&r( +ro%r$mD C7)-7 -$* /o $ ,)m+(& r&*$m& of #7& ,#r)*%, (oo;)*% "+ #7& E?-&(
f)(&. T7&* )m+or# #7& *&C /,? f)(& +ro!$!(1 )*#o $ *&C +ro2&-# for #&,#)*%. R&-om+)(& $((
2o!,. 4& -$"#)o", #7$# #7& *$m& of #7& 2o!, 7$, $(,o !&&* -7$*%&/ )* 1o"r 2o! -o*#ro( 2o!,
or S&9"&*-&r 2o!,. So 1o" 7$0& #o m$;& #7& *&-&,,$r1 -7$*%&, #o #7&,& S&9"&*-&r,.
Question: When should we use ODS?
Answer:
DWHQ, $r& #1+)-$((1 r&$/ o*(1D !$#-7 "+/$#&/ o* $ ,-7&/"(&
ODSQ, $r& m$)*#$)*&/ )* mor& r&$( #)m&D #r)-;(& f&/ -o*,#$*#(1
Question: What other ETL's you have worked with?
Answer:
I*form$#)-$ $*/ $(,o D$#$3"*-#)o* )f )# ), +r&,&*# )* 1o"r R&,"m&.

Question: How good are you with your PL/SQL?
Answer:
O* #7& ,-$(& of 1510 ,$1 :.55<
Question: What versions of DS you worked with?
Answer:
DS 8.5D DS 8.0.2D DS 6.0D DS 5.2
Question: What's the difference between Datastage Developers...?
Answer:
D$#$,#$%& /&0&(o+&r ), o*& 7oC C)(( -o/& #7& 2o!,. D$#$,#$%& /&,)%*&r ), 7oC C)(( /&,)%*
#7& 2o!D I m&$* 7& C)(( /&$( C)#7 !("& +r)*#, $*/ 7& C)(( /&,)%* #7& 2o!, #7& ,#$%&, #7$# $r&
r&9")r&/ )* /&0&(o+)*% #7& -o/&
Question: What are the requirements for your ETL tool?
Answer:
Do 1o" 7$0& ($r%& ,&9"&*#)$( f)(&, I1 m)(()o* roC,D for &?$m+(&B #7$# *&&/ #o !& -om+$r&/
&0&r1 /$1 0&r,", 1&,#&r/$1U
If ,oD #7&* $,; 7oC &$-7 0&*/or Co"(/ /o #7$#. T7)*; $!o"# C7$# +ro-&,, #7&1 $r& %o)*% #o
/o. Ar& #7&1 r&9")r)*% 1o" #o (o$/ 1&,#&r/$1G, f)(& )*#o $ #$!(& $*/ /o (oo;"+,U
Page 20 of 243
If ,oD RUNVV Ar& #7&1 /o)*% $ m$#-7Jm&r%& ro"#)*& #7$# ;*oC, 7oC #o +ro-&,, #7), )*
,&9"&*#)$( f)(&,U T7&* m$1!& #7&1 $r& #7& r)%7# o*&. I# $(( /&+&*/, o* C7$# 1o" *&&/ #7&
ET #o /o.
If 1o" $r& ,m$(( &*o"%7 )* 1o"r /$#$ ,&#,D #7&* &)#7&r Co"(/ +ro!$!(1 !& OK.
Question: What are the main differences between Ascential DataStage and
Informatica PowerCenter?
Answer:
Chuck Kelleys Answer= >o" $r& r)%7#P #7&1 7$0& +r&##1 m"-7 ,)m)($r f"*-#)o*$()#1.
HoC&0&rD C7$# $r& #7& r&9")r&m&*#, for 1o"r ET #oo(U Do 1o" 7$0& ($r%& ,&9"&*#)$( f)(&,
I1 m)(()o* roC,D for &?$m+(&B #7$# *&&/ #o !& -om+$r&/ &0&r1 /$1 0&r,", 1&,#&r/$1U If ,oD
#7&* $,; 7oC &$-7 0&*/or Co"(/ /o #7$#. T7)*; $!o"# C7$# +ro-&,, #7&1 $r& %o)*% #o /o.
Ar& #7&1 r&9")r)*% 1o" #o (o$/ 1&,#&r/$1G, f)(& )*#o $ #$!(& $*/ /o (oo;"+,U If ,oD RUNVV
Ar& #7&1 /o)*% $ m$#-7Jm&r%& ro"#)*& #7$# ;*oC, 7oC #o +ro-&,, #7), )* ,&9"&*#)$( f)(&,U
T7&* m$1!& #7&1 $r& #7& r)%7# o*&. I# $(( /&+&*/, o* C7$# 1o" *&&/ #7& ET #o /o. If 1o"
$r& ,m$(( &*o"%7 )* 1o"r /$#$ ,&#,D #7&* &)#7&r Co"(/ +ro!$!(1 !& OK.
Les Barbusinskis Answer= W)#7o"# %&##)*% )*#o ,+&-)f)-,D 7&r& $r& ,om& /)ff&r&*-&, 1o"
m$1 C$*# #o &?+(or& C)#7 &$-7 0&*/or=
Do&, #7& #oo( ",& $ r&($#)o*$( or $ +ro+r)&#$r1 /$#$!$,& #o ,#or& )#, .&#$ /$#$ $*/
,-r)+#,U If +ro+r)&#$r1D C71U
W7$# $//5o*, $r& $0$)($!(& for &?#r$-#)*% /$#$ from )*/",#r15,#$*/$r/ ERPD
A--o"*#)*%D $*/ 'R. +$-;$%&,U
'$* #7& #oo(G, .&#$ /$#$ !& )*#&%r$#&/ C)#7 #7)r/5+$r#1 /$#$ mo/&()*% $*/Jor
!",)*&,, )*#&(()%&*-& #oo(,U If ,oD 7oC $*/ C)#7 C7)-7 o*&,U
HoC C&(( /o&, &$-7 #oo( 7$*/(& -om+(&? #r$*,form$#)o*,D $*/ 7oC m"-7 &?#&r*$(
,-r)+#)*% ), r&9")r&/U
W7$# ;)*/, of ($*%"$%&, $r& ,"++or#&/ for ET ,-r)+# &?#&*,)o*,U
A(mo,# $*1 ET #oo( C)(( (oo; ();& $*1 o#7&r o* #7& ,"rf$-&. T7& #r)-; ), #o f)*/ o"# C7)-7
o*& C)(( Cor; !&,# )* 1o"r &*0)ro*m&*#. T7& !&,# C$1 IG0& fo"*/ #o m$;& #7),
/&#&rm)*$#)o* ), #o $,-&r#$)* 7oC ,"--&,,f"( &$-7 0&*/orG, -()&*#, 7$0& !&&* ",)*% #7&)r
+ro/"-#. E,+&-)$((1 -()&*#, C7o -(o,&(1 r&,&m!(& 1o"r ,7o+ )* #&rm, of ,)E&D )*/",#r1D )*5
7o",& ,;)(( ,&#,D +($#form,D ,o"r-& ,1,#&m,D /$#$ 0o("m&, $*/ #r$*,form$#)o* -om+(&?)#1.
A,; !o#7 0&*/or, for $ (),# of #7&)r -",#om&r, C)#7 -7$r$-#&r),#)-, ,)m)($r #o 1o"r oC* #7$#
7$0& ",&/ #7&)r ET +ro/"-# for $# (&$,# $ 1&$r. T7&* )*#&r0)&C &$-7 -()&*# I+r&f&r$!(1
,&0&r$( +&o+(& $# &$-7 ,)#&B C)#7 $* &1& #oC$r/ )/&*#)f1)*% "*&?+&-#&/ +ro!(&m,D !&*&f)#,D
or 9")r;)*&,, C)#7 #7& #oo( #7$# 7$0& !&&* &*-o"*#&r&/ !1 #7$# -",#om&r. U(#)m$#&(1D $,;
&$-7 -",#om&r 6 )f #7&1 7$/ )# $(( #o /o o0&r $%$)* 6 C7&#7&r or *o# #7&1G/ -7oo,& #7& ,$m&
#oo( $*/ C71U >o" m)%7# !& ,"r+r),&/ $# ,om& of #7& $*,C&r,.
1oyce Bischoffs Answer= >o" ,7o"(/ /o $ -$r&f"( r&,&$r-7 2o! C7&* ,&(&-#)*% +ro/"-#,.
>o" ,7o"(/ f)r,# /o-"m&*# 1o"r r&9")r&m&*#,D )/&*#)f1 $(( +o,,)!(& +ro/"-#, $*/ &0$("$#&
&$-7 +ro/"-# $%$)*,# #7& /&#$)(&/ r&9")r&m&*#,. T7&r& $r& *"m&ro", ET +ro/"-#, o* #7&
Page 21 of 243
m$r;&# $*/ )# ,&&m, #7$# 1o" $r& (oo;)*% $# o*(1 #Co of #7&m. If 1o" $r& "*f$m)()$r C)#7
#7& m$*1 +ro/"-#, $0$)($!(&D 1o" m$1 r&f&r #o CCC.#/$*.-omD #7& D$#$ A/m)*),#r$#)o*
N&C,(&##&rD for +ro/"-# (),#,.
If 1o" $,; #7& 0&*/or,D #7&1 C)(( -&r#$)*(1 !& $!(& #o #&(( 1o" C7)-7 of #7&)r +ro/"-#G,
f&$#"r&, $r& ,#ro*%&r #7$* #7& o#7&r +ro/"-#. A,; !o#7 0&*/or, $*/ -om+$r& #7& $*,C&r,D
C7)-7 m$1 or m$1 *o# !& #o#$((1 $--"r$#&. Af#&r 1o" $r& 0&r1 f$m)()$r C)#7 #7& +ro/"-#,D
-$(( #7&)r r&f&r&*-&, $*/ !& ,"r& #o #$(; C)#7 #&-7*)-$( +&o+(& C7o $r& $-#"$((1 ",)*% #7&
+ro/"-#. >o" C)(( *o# C$*# #7& 0&*/or #o 7$0& $ r&+r&,&*#$#)0& +r&,&*# C7&* 1o" ,+&$;
C)#7 ,om&o*& $# #7& r&f&r&*-& ,)#&. I# ), $(,o *o# $ %oo/ )/&$ #o /&+&*/ "+o* $ 7)%75(&0&(
m$*$%&r $# #7& r&f&r&*-& ,)#& for $ r&()$!(& o+)*)o* of #7& +ro/"-#. .$*$%&r, m$1 +$)*# $
0&r1 ro,1 +)-#"r& of $*1 ,&(&-#&/ +ro/"-# ,o #7$# #7&1 /o *o# (oo; ();& #7&1 ,&(&-#&/ $*
)*f&r)or +ro/"-#.
Question= How many places u can call Routines?
Answer=
Fo"r P($-&, " -$* -$((
1. Tr$*,form of ro"#)*&
$. D$#& Tr$*,form$#)o*
!. U+,#r)*% Tr$*,form$#)o*
2. Tr$*,form of #7& 4&for& @ Af#&r S"!ro"#)*&,
3. H. #r$*,form$#)o*
4. W&! !$,& #r$*,form$#)o*
Question= What is the Batch Program and how can generate?
Answer= 4$#-7 +ro%r$m ), #7& +ro%r$m )#Q, %&*&r$#& r"* #)m& #o m$)*#$)* !1 #7& D$#$,#$%&
)#,&(f !"# " -$* &$,1 #o -7$*%& oC* #7& !$,), of 1o"r r&9")r&m&*# IE?#r$-#)o*D
Tr$*,form$#)o*D o$/)*%B .4$#-7 +ro%r$m $r& %&*&r$#& /&+&*/, 1o"r 2o! *$#"r& &)#7&r
,)m+(& 2o! or ,&9"&*-&r 2o!D 1o" -$* ,&& #7), +ro%r$m o* 2o! -o*#ro( o+#)o*.
Question: Suppose that 4 job control by the sequencer like (job 1, job 2, job 3, job 4 )
if job 1 have 10,000 row ,after run the job only 5000 data has been loaded in target
table remaining are not loaded and your job going to be aborted then.. How can
short out the problem?
Answer=
S"++o,& 2o! ,&9"&*-&r ,1*-7ro*)&, or -o*#ro( 4 2o! !"# 2o! 1 7$0& +ro!(&mD )* #7),
-o*/)#)o* ,7o"(/ %o /)r&-#or $*/ -7&-; )# C7$# #1+& of +ro!(&m ,7oC)*% &)#7&r /$#$ #1+&
+ro!(&mD C$r*)*% m$,,$%&D 2o! f$)( or 2o! $!or#&/D If 2o! f$)( m&$*, /$#$ #1+& +ro!(&m or
m),,)*% -o("m* $-#)o* .So " ,7o"(/ %o R"* C)*/oC 5T'()-;5T Tr$-)*%5TP&rform$*-& or
I* 1o"r #$r%&# #$!(& 5T%&*&r$( 5T $-#)o*5T ,&(&-# #7), o+#)o* 7&r& #Co o+#)o*
I)B O* F$)( 55 'omm)# D 'o*#)*"&
I))B O* S;)+ 55 'omm)#D 'o*#)*"&.
F)r,# " -7&-; 7oC m"-7 /$#$ $(r&$/1 (o$/ $f#&r #7&* ,&(&-# o* ,;)+ o+#)o* #7&*
-o*#)*"& $*/ C7$# r&m$)*)*% +o,)#)o* /$#$ *o# (o$/&/ #7&* ,&(&-# O* F$)( D
'o*#)*"& ...... A%$)* R"* #7& 2o! /&f)$*#(1 " %&#, ,"--&,,f"( m$,,$%&
Question: What happens if RCP is disable?
Page 22 of 243
Answer:
I* ,"-7 -$,& OSH 7$, #o +&rform Im+or# $*/ &?+or# &0&r1 #)m& C7&* #7& 2o! r"*, $*/ #7&
+ro-&,,)*% #)m& 2o! ), $(,o )*-r&$,&/...
Question: How do you rename all of the jobs to support your new File-naming
conventions?
Answer: 'r&$#& $ E?-&( ,+r&$/,7&&# C)#7 *&C $*/ o(/ *$m&,. E?+or# #7& C7o(& +ro2&-# $,
$ /,?. Wr)#& $ P&r( +ro%r$mD C7)-7 -$* /o $ ,)m+(& r&*$m& of #7& ,#r)*%, (oo;)*% "+ #7&
E?-&( f)(&. T7&* )m+or# #7& *&C /,? f)(& +ro!$!(1 )*#o $ *&C +ro2&-# for #&,#)*%.
R&-om+)(& $(( 2o!,. 4& -$"#)o", #7$# #7& *$m& of #7& 2o!, 7$, $(,o !&&* -7$*%&/ )* 1o"r
2o! -o*#ro( 2o!, or S&9"&*-&r 2o!,. So 1o" 7$0& #o m$;& #7& *&-&,,$r1 -7$*%&, #o #7&,&
S&9"&*-&r,.
Question: What will you in a situation where somebody wants to send you a file and
use that file as an input or reference and then run job.
Answer: A. U*/&r W)*/oC,= U,& #7& QW$)#ForF)(&A-#)0)#1Q "*/&r #7& S&9"&*-&r, $*/
#7&* r"* #7& 2o!. .$1 !& 1o" -$* ,-7&/"(& #7& ,&9"&*-&r $ro"*/ #7& #)m& #7& f)(& ),
&?+&-#&/ #o $rr)0&.
4. U*/&r UNIH= Po(( for #7& f)(&. O*-& #7& f)(& 7$, ,#$r# #7& 2o! or ,&9"&*-&r /&+&*/)*% o*
#7& f)(&
Question: What are Sequencers?
Answer: S&9"&*-&r, $r& job control programs #7$# &?&-"#& o#7&r 2o!, C)#7 +r&,&# 3o!
+$r$m&#&r,.
Question: How did you handle an 'Aborted' sequencer?
Answer: I* $(mo,# $(( -$,&, C& 7$0& #o /&(&#& #7& /$#$ )*,&r#&/ !1 #7), from D4 m$*"$((1
$*/ f)? #7& 2o! $*/ #7&* r"* #7& 2o! $%$)*.
Question34: What is the difference between the Filter stage and the Switch stage?
Ans: T7&r& $r& #Co m$)* /)ff&r&*-&,D $*/ +ro!$!(1 ,om& m)*or o*&, $, C&((. T7& #Co
m$)* /)ff&r&*-&, $r& $, fo((oC,.
1B T7& F)(#&r ,#$%& -$* ,&*/ o*& )*+"# roC #o mor& #7$* o*& o"#+"# ()*;. T7&
SC)#-7 ,#$%& -$* *o# 5 #7& ' switc -o*,#r"-# 7$, $* )m+()-)# brea! )* &0&r1 case"
2B T7& SC)#-7 ,#$%& ), ()m)#&/ #o 12: o"#+"# ()*;,P #7& F)(#&r ,#$%& -$* 7$0& $
#7&or&#)-$((1 "*()m)#&/ *"m!&r of o"#+"# ()*;,. INo#&= #7), ), not $ -7$((&*%&VB
Question: HoC -$* ) $-7)&0& constraint based loading using datastage7.5..1 #$r%&#
#$!(&, 7$0& )*#&r /&+&*/&*-)&, ).&. Pr)m$r1 ;&1 for&)%* ;&1 -o*,#r$)*#,. I C$*# m1 +r)m$r1
;&1 #$!(&, #o !& (o$/&/ f)r,# $*/ #7&* m1 for&)%* ;&1 #$!(&, $*/ $(,o +r)m$r1 ;&1 #$!(&,
,7o"(/ !& -omm)##&/ !&for& #7& for&)%* ;&1 #$!(&, $r& &?&-"#&/. HoC -$* I %o $!o"# )#U
Page 23 of 243
Ans:1) 'r&$#& $ 3o! S&9"&*-&r #o (o$/ 1o" #$!(&, )* S&9"&*#)$( mo/&
I* #7& ,&9"&*-&r '$(( $(( Pr)m$r1 K&1 #$!(&, (o$/)*% 3o!, f)r,# $*/ fo((oC&/ !1 For&)%*
;&1 #$!(&,D C7&* #r)%%&r)*% #7& For&)%* #$!(&, (o$/ 3o! #r)%%&r #7&m o*(1 C7&* Pr)m$r1
K&1 (o$/ 3o!, r"* S"--&,,f"((1 I ).&. OK #r)%%&rB
2) To )m+ro0& #7& +&rform$*-& of #7& 3o!D 1o" -$* /),$!(& $(( #7& -o*,#r$)*#, o* #7& #$!(&,
$*/ (o$/ #7&m. O*-& (o$/)*% /o*&D -7&-; for #7& )*#&%r)#1 of #7& /$#$. W7)-7 /o&, *o#
m&&# r$),& &?-&+#)o*$( /$#$ $*/ -(&$*,& #7&m.
T7), o*(1 $ ,"%%&,#)o*D *orm$((1 C7&* (o$/)*% o* -o*,#r$)*#, $r& "+D C)(( /r$,#)-$((1
+&rform$*-& C)(( %o /oC*.
3) If 1o" ",& S#$r ,-7&m$ mo/&()*%D C7&* 1o" -r&$#& +71,)-$( D4 from #7& mo/&(D 1o"
-$* /&(&#& $(( -o*,#r$)*#, $*/ #7& r&f&r&*#)$( )*#&%r)#1 Co"(/ !& m$)*#$)*&/ )* #7& ET
+ro-&,, !1 r&f&rr)*% $(( 1o"r /)m&*,)o* ;&1, C7)(& (o$/)*% f$-# #$!(&,. O*-& $((
/)m&*,)o*$( ;&1, $r& $,,)%*&/ #o $ f$-# #7&* /)m&*,)o* $*/ f$-# -$* !& (o$/&/ #o%&#7&r. A#
#7& ,$m& #)m& RI ), !&)*% m$)*#$)*&/ $# ET +ro-&,, (&0&(.
Question: How do you merge two files in DS?
Ans: E)#7&r ",& Copy -omm$*/ $, $ 4&for&52o! ,"!ro"#)*& )f #7& m&#$/$#$ of #7& 2 f)(&,
$r& ,$m& or -r&$#& $ 2o! #o -o*-$#&*$#& #7& 2 f)(&, )*#o o*&D )f #7& m&#$/$#$ ), /)ff&r&*#.
Question: How do you eliminate duplicate rows?
Ans: D$#$ S#$%& +ro0)/&, ", C)#7 $ ,#$%& R&mo0& D"+()-$#&, )* E*#&r+r),& &/)#)o*. U,)*%
#7$# ,#$%& C& -$* &()m)*$#& #7& /"+()-$#&, !$,&/ o* $ ;&1 -o("m*.
Question: How do you pass filename as the parameter for a job?
Ans: W7)(& 2o! /&0&(o+m&*# C& -$* -r&$#& $ +$r$m&#&r QFIEANA.EQ $*/ #7& 0$("& -$*
!& +$,,&/ C7)(&
Question: How did you handle an 'Aborted' sequencer?
Ans: I* $(mo,# $(( -$,&, C& 7$0& #o /&(&#& #7& /$#$ )*,&r#&/ !1 #7), from D4 m$*"$((1 $*/
f)? #7& 2o! $*/ #7&* r"* #7& 2o! $%$)*.
Question: Is there a mechanism available to export/import individual DataStage ETL
jobs from the UNIX command line?
Ans: Tr1 /,-m/&?+or# $*/ /,-m/)m+or#. Wo*Q# 7$*/(& #7& F)*/)0)/"$( 2o!F r&9")r&m&*#. >o" -$* o*(1 &?+or# f"((
+ro2&-#, from #7& -omm$*/ ()*&.
>o" -$* f)*/ #7& &?+or# $*/ )m+or# &?&-"#$!(&, o* #7& -()&*# m$-7)*& ","$((1 ,om&+($-& ();&= '=WPro%r$m
F)(&,WA,-&*#)$(WD$#$S#$%&.
Question: Diff. between 1OIN stage and MERGE stage.
Answer:
Page 24 of 243
1OIN: P&rform, 2o)* o+&r$#)o*, o* #Co or mor& /$#$ ,&#, )*+"# #o #7& ,#$%& $*/ #7&*
o"#+"#, #7& r&,"(#)*% /$#$,&#.
MERGE: 'om!)*&, $ ,or#&/ m$,#&r /$#$ ,&# C)#7 o*& or mor& ,or#&/ "+/$#&/ /$#$ ,&#,.
T7& -o("m*, from #7& r&-or/, )* #7& m$,#&r $*/ "+/$#& /$#$ ,&# , $r& m&r%&/ ,o #7$# #7&
o"# +"# r&-or/ -o*#$)*, $(( #7& -o("m*, from #7& m$,#&r r&-or/ +(", $*1 $//)#)o*$(
-o("m*, from &$-7 "+/$#& r&-or/ #7$# r&9")r&/.
A m$,#&r r&-or/ $*/ $* "+/$#& r&-or/ $r& m&r%&/ o*(1 )f !o#7 of #7&m 7$0& #7& ,$m&
0$("&, for #7& m&r%& ;&1 -o("m*I,B #7$# C& ,+&-)f1 ..&r%& ;&1 -o("m*, $r& o*& or mor&
-o("m*, #7$# &?),# )* !o#7 #7& m$,#&r $*/ "+/$#& r&-or/,.
Question: Advantages of the DataStage?
Answer:
"usiness a#$anta%es:
H&(+, for !&##&r !",)*&,, /&-),)o*,P
I# ), $!(& #o )*#&%r$#& /$#$ -om)*% from $(( +$r#, of #7& -om+$*1P
I# 7&(+, #o "*/&r,#$*/ #7& *&C $*/ $(r&$/1 &?),#)*% -()&*#,P
W& -$* -o((&-# /$#$ of /)ff&r&*# -()&*#, C)#7 7)mD $*/ -om+$r& #7&mP
I# m$;&, #7& r&,&$r-7 of *&C !",)*&,, +o,,)!)()#)&, +o,,)!(&P
W& -$* $*$(1E& #r&*/, of #7& /$#$ r&$/ !1 7)m.
Technolo%ical a#$anta%es:
I# 7$*/(&, $(( -om+$*1 /$#$ $*/ $/$+#, #o #7& *&&/,P
I# off&r, #7& +o,,)!)()#1 for #7& or%$*)E$#)o* of $ -om+(&? !",)*&,, )*#&(()%&*-&P
F(&?)!(1 $*/ ,-$($!(&P
I# $--&(&r$#&, #7& r"**)*% of #7& +ro2&-#P
E$,)(1 )m+(&m&*#$!(&.
Page 25 of 243
DATASTAGE FAQ
1. What is the architecture of data stage?
4$,)-$((1 $r-7)#&-#"r& of DS ), -()&*#J,&r0&r $r-7)#&-#"r&.
'()&*# -om+o*&*#, @ ,&r0&r -om+o*&*#,
'()&*# -om+o*&*#, $r& 4 #1+&, #7&1 $r&
1. D$#$ ,#$%& /&,)%*&r
2. D$#$ ,#$%& $/m)*),#r$#or
3. D$#$ ,#$%& /)r&-#or
4. D$#$ ,#$%& m$*$%&r
Data stage designer ), ",&r for #o /&,)%* #7& 2o!,
Data stage manager ), ",&/ for #o )m+or# @ &?+or# #7& +ro2&-# #o 0)&C @ &/)# #7& -o*#&*#,
of #7& r&+o,)#or1.
Data stage administrator ), ",&/ for -r&$#)*% #7& +ro2&-#D /&(&#)*% #7& +ro2&-# @ ,&##)*%
#7& &*0)ro*m&*# 0$r)$!(&,.
Data stage director ), ",& for #o r"* #7& 2o!,D 0$()/$#& #7& 2o!,D ,-7&/"()*% #7& 2o!,.
Server components
Page 26 of 243
DS server= r"*, &?&-"#$!(& ,&r0&r 2o!,D "*/&r #7& -o*#ro( of #7& DS /)r&-#orD #7$# &?#r$-#D
#r$*,formD $*/ (o$/ /$#$ )*#o $ DWH.

DS Package installer= A ",&r )*#&rf$-& ",&/ #o )*,#$(( +$-;$%&/ DS 2o!, $*/ +("%5)*P
Repository or project= $ -&*#r$( ,#or& #7$# -o*#$)*, $(( #7& )*form$#)o* r&9")r&/ #o !")(/
DWH or /$#$ m$r#.
2. What r the stages u worked on?

3. I have some jobs every month automatically delete the log details what r the steps
u have to take for that
W& 7$0& #o ,&# #7& o+#)o* $"#o+"r%& )* DS A/m)*,#r$#or.
4. I want to run the multiple jobs in the single job. How can u handle.

I* 2o! +ro+&r#)&, ,&# #7& o+#)o* ALLOW MULTIPLE INSTANCES.
5. What is version controlling in DS?
I* DSD 0&r,)o* -o*#ro(()*% ), ",&/ for !$-; "+ #7& +ro2&-# or 2o!,.
T7), o+#)o* ), $0$)($!(& )* DS 8.1 0&r,)o* o*C$r/,.
V&r,)o* -o*#ro(, r of 2 #1+&,.
1. VSS5 0),"$( ,o"r-& ,$f&
2. 'VSS5 -o*-"rr&*# 0),"$( ,o"r-& ,$f&.
VSS ), /&,)%*&/ !1 .)-ro,of# !"# #7& /),$/0$*#$%& ), o*(1 o*& ",&r -$* $--&,, $# $ #)m&D
o#7&r ",&r -$* C$)# "*#)( #7& f)r,# ",&r -om+(&#& #7& o+&r$#)o*.
'VSSD !1 ",)*% #7), m$*1 ",&r, -$* $--&,, -o*-"rr&*#(1. W7&* -om+$r&/ #o VSSD 'VSS
-o,# ), 7)%7.
6. What is the difference between clear log file and clear status file?
Clear log555 C& -$* -(&$r #7& (o% /&#$)(, !1 ",)*% #7& DS D)r&-#or. U*/&r 2o! m&*"
-(&$r (o% o+#)o* ), $0$)($!(&. 41 ",)*% #7), o+#)o* C& -$* -(&$r #7& (o% /&#$)(, of
+$r#)-"($r 2o!.
Clear status file5555 (&#, #7& ",&r r&mo0& #7& ,#$#", of #7& r&-or/ $,,o-)$#&/ C)#7 $(( ,#$%&,
of ,&(&-#&/ 2o!,.I)* DS D)r&-#orB
7. I developed 1 job with 50 stages, at the run time one stage is missed how can u
identify which stage is missing?
41 ",)*% ",$%& $*$(1,), #oo(D C7)-7 ), $0$)($!(& )* DS m$*$%&rD C& -$* f)*/ o"# #7& C7$# r
#7& )#&m, r ",&/ )* 2o!.
Page 27 of 243
8. My job takes 30 minutes time to run, I want to run the job less than 30 minutes?
What r the steps we have to take?
41 ",)*% +&rform$*-& #"*)*% $,+&-#, C7)-7 $r& $0$)($!(& )* DSD C& -$* r&/"-& #)m&.
Tuning aspect
I* DS $/m)*),#r$#or = )*5+ro-&,, $*/ )*#&r +ro-&,,
I* !&#C&&* +$,,)0& ,#$%&, = )*#&r +ro-&,, ,#$%&
O'I ,#$%& = Arr$1 ,)E& $*/ #r$*,$-#)o* ,)E&
A*/ $(,o ",& ()*; +$r#)#)o*&r @ ()*; -o((&-#or ,#$%& )* !&#C&&* +$,,)0& ,#$%&,
9. How to do road transposition in DS?
P)0o# ,#$%& ), ",&/ #o #r$*,+o,)#)o* +"r+o,&. P)0o# ), $* $-#)0& ,#$%& #7$# m$+, ,&#, of
-o("m*, )* $* )*+"# #$!(& #o $ ,)*%(& -o("m* )* $* o"#+"# #$!(&.
10. If a job locked by some user, how can you unlock the particular job in DS?
W& -$* "*(o-; #7& 2o! !1 ",)*% clean up resources option C7)-7 ), $0$)($!(& )* DS
D)r&-#or. O#7&r C),& C& -$* f)*/ PID I+ro-&,, )/B $*/ ;)(( #7& +ro-&,, )* UNIH ,&r0&r.
11. What is a container? How many types containers are available? Is it possible to
use container as look up?
A -o*#$)*&r ), $ %ro"+ of ,#$%&, $*/ ()*;,. 'o*#$)*&r, &*$!(& 1o" #o ,)m+()f1 $*/
mo/"($r)E& 1o"r ,&r0&r 2o! /&,)%*, !1 r&+($-)*% -om+(&? $r&$, of #7& /)$%r$m C)#7 $
,)*%(& -o*#$)*&r ,#$%&.
D$#$S#$%& +ro0)/&, #Co #1+&, of -o*#$)*&r=
X Local containers. T7&,& $r& -r&$#&/ C)#7)* $ 2o! $*/ $r& o*(1 $--&,,)!(& !1 #7$# 2o!
o*(1.
X Shared containers. T7&,& $r& -r&$#&/ ,&+$r$#&(1 $*/ $r& ,#or&/ )* #7& R&+o,)#or1 )* #7&
,$m& C$1 #7$# 2o!, $r&. S7$r&/ -o*#$)*&r, -$* ",& $*1 2o! )* #7& +ro2&-#.
>&, C& -$* ",& -o*#$)*&r $, (oo; "+.
12. How to deconstruct the shared container?
To /&-o*,#r"-# #7& ,7$r&/ -o*#$)*&rD f)r,# " 7$0& #o -o*0&r# #7& ,7$r&/ -o*#$)*&r #o (o-$(
-o*#$)*&r. A*/ #7&* /&-o*,#r"-# #7& -o*#$)*&r.
13. I am getting input value like X Iconv(~31 DEC 1967,D)? What is the X
value?
H 0$("& ), Y&ro.
I-o*0 F"*-#)o* 'o*0&r#, $ ,#r)*% #o $* )*#&r*$( ,#or$%& form$#.I# #$;&, 31 /&- 1<68 $, E&ro
$*/ -o"*#, /$1, from #7$# /$#&I315/&-51<68B.
Page 28 of 243
14. What is the Unit testing, integration testing and system testing?
Unit testing: A, for D, "*)# #&,# C)(( -7&-; #7& /$#$ #1+& m),m$#-7)*%D
S)E& of #7& +$r#)-"($r /$#$ #1+&D -o("m* m),m$#-7)*%.
Integration testing: A--or/)*% #o /&+&*/&*-1 C& C)(( +"# $(( 2o!, $r& )*#&%r$#&/ )* #o o*&
,&9"&*-&. T7$# ), -$((&/ -o*#ro( ,&9"&*-&.
System testing: S1,#&m #&,#)*% ), *o#7)*% !"# #7& +&rform$*-& #"*)*% $,+&-#, )* D,.
15. What are the command line functions that import and export the DS jobs?
D,)m+or#.&?& 5555 To )m+or# #7& D$#$S#$%& -om+o*&*#,
D,&?+or#.&?& 5555 To &?+or# #7& D$#$S#$%& -om+o*&*#,
16. How many hashing algorithms are available for static hash file and dynamic hash
file?
S)?#&&* 7$,7)*% $(%or)#7m, for ,#$#)- 7$,7 f)(&.
TCo 7$,7)*% $(%or)#7m, for /1*$m)- 7$,7 f)(&I GENERA or SEQ.NU.B
17. What happens when you have a job that links two passive stages together?
O!0)o",(1 #7&r& ), ,om& +ro-&,, %o)*% o*. U*/&r -o0&r, D, )*,&r#, $ -"#5/oC*
#r$*,form&r ,#$%& !&#C&&* #7& +$,,)0& ,#$%&,D C7)-7 2",# +$,,&, /$#$ ,#r$)%7# from o*&
,#$%& #o #7& o#7&r.
18. What is the use use of Nested condition activity?
N&,#&/ 'o*/)#)o*. A((oC, 1o" #o f"r#7&r !r$*-7 #7& &?&-"#)o* of $ ,&9"&*-& /&+&*/)*% o*
$ -o*/)#)o*.
19. I have three jobs A,B,C . Which are dependent on each other? I want to run A
& C jobs daily and B job runs only on Sunday. How can u do it?
F)r,# 1o" 7$0& #o ,-7&/"(& A @ ' 2o!, .o*/$1 #o S$#"r/$1 )* o*& ,&9"&*-&.
N&?# #$;& #7r&& 2o!, $--or/)*% #o /&+&*/&*-1 )* o*& mor& ,&9"&*-& $*/ ,-7&/"(& #7$# 2o!
o*(1 S"*/$1.
Page 29 of 243
TOP 10 FEATURES IN DATASTAGE HAWK
T7& II)0&2005 -o*f&r&*-& m$r;&/ #7& f)r,# +"!()- +r&,&*#$#)o*, of #7& f"*-#)o*$()#1 )* #7&
W&!S+7&r& I*form$#)o* I*#&%r$#)o* H$C; r&(&$,&. T7o"%7 )#Q, ,#)(( $ f&C mo*#7, $C$1 I
$m ,7$r)*% m1 #o+ T&* #7)*%, I $m (oo;)*% forC$r/ #o )* D$#$S#$%& H$C;=
1B T7& m&#$/$#$ ,&r0&r. To !orroC $ ,)m)(& from #7$# 2"/%& o* Am&r)-$* I/o( FU,)*%
.&#$S#$%& ), ;)*/ of ();& !$#7)*% )* #7& o-&$* o* $ -o(/ mor*)*%. >o" ;*oC )#Q, %oo/ for
1o" !"# #7$# /o&,*Q# ,#o+ )# from fr&&E)*% #7& -roC* 2&C&(,.F .&#$S#$%& ), %oo/ for ET
+ro2&-#, !"# *o*& of #7& +ro2&-#, IQ0& !&&* o* 7$, $-#"$((1 ",&/ )#. Too m"-7 &ffor#
r&9")r&/ #o )*,#$(( #7& ,of#C$r&D ,&#"+ #7& m&#$!ro;&r,D m)%r$#& #7& m&#$/$#$D $*/ (&$r*
7oC #7& +ro/"-# Cor;, $*/ Cr)#& r&+or#,. H$C; !r)*%, #7& -ommo* r&+o,)#or1 $*/
)m+ro0&/ m&#$/$#$ r&+or#)*% $*/ C& -$* %&# #7& +o,)#)0& &ff&-#)0&, of !$#7)*% )* ,&$ C$#&r
C)#7o"# #7& ,7r)*;$%& #7$# -om&, C)#7 )#.
2B Q"$()#1S#$%& o0&r7$"(. D$#$ Q"$()#1 r&+or#)*% -$* !& $*o#7&r for%o##&* $,+&-# of /$#$
)*#&%r$#)o* +ro2&-#,. );& .&#$S#$%& #7& Q"$()#1S#$%& ,&r0&r $*/ -()&*# 7$/ $* $//)#)o*$(
)*,#$((D #r$)*)*% $*/ )m+(&m&*#$#)o* o0&r7&$/ ,o m$*1 D$#$S#$%& +ro2&-#, /)/ *o# ",& )#. I
$m (oo;)*% forC$r/ #o mor& )*#&%r$#)o* +ro2&-#, ",)*% ,#$*/$r/),$#)o*D m$#-7)*% $*/
,"r0)0or,7)+ #o )m+ro0& 9"$()#1 o*-& #7&,& f&$#"r&, $r& mor& $--&,,)!(& $*/ &$,)&r #o ",&.
3B Fr)-#)o*(&,, 'o**&-#)0)#1 $*/ 'o**&-#)o* O!2&-#,. IQ0& -$((&/ D42 &0&r1 r"/& *$m&
"*/&r #7& ,"*. No# !&-$",& )#Q, $ !$/ /$#$!$,& !"# !&-$",& ,&##)*% "+ r&mo#& $--&,, #$;&,
m& $*1C7&r& from f)0& m)*"#&, #o f)0& C&&;, /&+&*/)*% o* 7oC o!,-"r& #7& &rror
m&,,$%& $*/ 7oC 7$r/ )# ), #o f)*/ #7& o!,-"r& ,&#"+ ,#&+ #7$# C$, m),,&/ /"r)*%
)*,#$(($#)o*. A*1#7)*% #7$# m$;&, -o**&-#)*% #o /$#$!$,& &$,)&r %&#, $ !)% #)-; from m&.
4B P$r$((&( 2o! r$*%& (oo;"+. I $m (oo;)*% forC$r/ #o #7), o*& !&-$",& )# C)(( ,#o+ +&o+(&
$,;)*% for )# o* for"m,. I# (oo;, %oo/D )#Q, !&&* m&r%&/ )*#o #7& &?),#)*% (oo;"+ form $*/
,&&m, &$,1 #o ",&. W)(( !& )*#&r&,#&/ #o ,&& #7& +&rform$*-&.
Page 30 of 243
5B S(oC(1 '7$*%)*% D)m&*,)o* S#$%&. T7), ), o*& of #7o,& #7)*%, #7$# I*form$#)-$ C&r&
$!(& #o #r"m+&# $# +ro/"-# -om+$r),o*,D #7$# #7&1 7$0& mor& o"# of #7& !o? DW ,"++or#.
T7&r& $r& $ f&C &*7$*-&m&*#, #o m$;& "+/$#&, #o /)m&*,)o* #$!(&, &$,)&rD #7&r& ), #7&
)m+ro0&/ ,"rro%$#& ;&1 %&*&r$#orD #7&r& ), #7& ,(oC(1 -7$*%)*% /)m&*,)o* ,#$%& $*/
"+/$#&, +$,,&/ #o )* m&mor1 (oo;"+,. T7$#Q, )# for m& C)#7 D4.S %&*&r$#&/ ;&1,D IQm
o*(1 /o)*% #7& ;&1, )* #7& ET 2o! from *oC o*V D$#$S#$%& ,&r0&r 2o!, 7$0& #7& 7$,7 f)(&
(oo;"+ C7&r& 1o" -$* r&$/ $*/ Cr)#& #o )# $# #7& ,$m& #)m&D +$r$((&( 2o!, C)(( 7$0& #7&
"+/$#&$!(& (oo;"+.
6B 'o(($!or$#)o*= !&##&r /&0&(o+&r -o(($!or$#)o*. E0&r1o*& 7$#&, o+&*)*% $ 2o! $*/ !&)*%
#o(/ )# ), (o-;&/. F4(oo/1 C7$#7),*$m& 7$, %o*& #o ("*-7D (o-;&/ #7& 2o! $*/ *oC 7),
+$,,Cor/ +ro#&-#&/ ,-r&&* ,$0&r ), "+V U*+("% 7), P'VF U*/&r H$C; 1o" -$* o+&* $
r&$/o*(1 -o+1 of $ (o-;&/ 2o! +(", 1o" %&# #o(/ C7o 7$, (o-;&/ #7& 2o! ,o 1o" ;*oC
C7om #o -"r,&.
8B S&,,)o* D),-o**&-#)o*. A--om+$*)&/ !1 #7& m&#$(()- -r1 of F&?#&rm)*$#&V
&?#&rm)*$#&VF $* $/m)*),#r$#or -$* /),-o**&-# ,&,,)o*, $*/ "*(o-; 2o!,.
:B Im+ro0&/ SQ 4")(/&r. I ;*oC $ (o# of +&o+(& -ro,, #7& ,#r&&# C7&* #7&1 ,&& #7& SQ
4")(/&r -om)*%. G&##)*% #7& SQ !")(/&r #o !")(/ -om+(&? SQ ), $ !)# ();& #&$-7)*% $
mo*;&1 7oC #o +($1 -7&,,. W7$# I /o ();& $!o"# #7& -"rr&*# SQ !")(/&r ), #7$# )#
,1*-7ro*),&, 1o"r SQ ,&(&-# (),# C)#7 1o"r ET -o("m* (),# #o $0o)/ -o("m* m),m$#-7&,.
I $m 7o+)*% #7& *&?# 0&r,)o* ), mor& f(&?)!(& $*/ -$* !")(/ -om+(&? SQ.
<B Im+ro0&/ 2o! ,#$r#"+ #)m&,. Sm$(( +$r$((&( 2o!, C)(( r"* f$,#&r. I -$(( )# #7& /&$#7 of $
#7o",$*/ -"#,D 1o"r 0&r1 ($r%& +$r$((&( 2o! #$;&, #oo (o*% #o r"* !&-$",& $ #7o",$*/
,m$((&r 2o!, $r& ,#$r#)*% $*/ ,#o++)*% $# #7& ,$m& #)m& $*/ -"##)*% )*#o 'PU $*/ m&mor1.
H$C; m$;&, #7&,& -"#, (&,, +$)*f"(.
10B 'ommo* (o%%)*%. o% 0)&C, #7$# Cor; $-ro,, 2o!,D (o% ,&$r-7&,D (o% /$#& -o*,#r$)*#,D
C)(/-$r/ m&,,$%& f)(#&r,D ,$0&/ 9"&r)&,. I#Q, $(( %oo/. >o" *o (o*%&r *&&/ #o ,&*/ o"# $
,&$r-7 +$r#1 #o f)*/ $* &rror m&,,$%&.
T7$#Q, m1 #o+ #&*. I $m $(,o 7o+)*% #7& ,of#C$r& -om&, )* $ !o? ,7$+&/ ();& $ 7$C; $*/
m$;&, $ 7$C; ,-r&$m C7&* 1o" o+&* )#. A !)# ();& #7o,& $**o1)*% %r&&#)*% -$r/,. I, #7&r&
$*1 f"*-#)o*$()#1 1o" #7)*; H$C; ), m),,)*% #7$# 1o" r&$((1 C$*# #o ,&&U
Page 31 of 243
DATASTAGE NOTES
DataStage Tips:
1. A%%r&%$#or ,#$%& /o&, *o# ,"++or# mor& #7$* o*& ,o"r-&D )f 1o" #r1 #o /o #7), 1o"
C)(( %&# &rrorD ZT7& /&,#)*$#)o* ,#$%& -$**o# ,"++or# $*1 mor& ,#r&$m )*+"# ()*;,[.
2. >o" -$* %)0& N *"m!&r )*+"# ()*;, #o #r$*,form&r ,#$%&D !"# 1o" -$* %)0&
,&9"&*#)$( f)(& ,#$%& $, r&f&r&*-& ()*;. >o" -$* %)0& o*(1 o*& ,&9"&*#)$( f)(& ,#$%&
$, +r)m$r1 ()*; $*/ *"m!&r o#7&r ()*;, $, r&f&r&*-& ()*;. If 1o" #r1 #o %)0&
,&9"&*#)$( f)(& ,#$%& $, r&f&r&*-& ()*; 1o" C)(( %&# &rror $,D ZT7& /&,#)*$#)o* ,#$%&
-$**o# ,"++or# $*1 mor& ,#r&$m )*+"# ()*;,[ !&-$",& r&f&r&*-& ()*; r&+r&,&*# $
(oo;"+ #$!(&D !"# ,&9"&*#)$( f)(& /o&, *o# ",& $, (oo;"+ #$!(&D H$,7&/ f)(& -$* !&
",& $, (oo;"+ #$!(&.
Sequential file stage:
S&9"&*#)$( f)(& ,#$%& ), +ro0)/&/ !1 /$#$,#$%& #o $--&,, /$#$ from ,&9"&*#)$( f)(&.
IT&?# f)(&B
T7& $--&,, m&-7$*),m of $ ,&9"&*#)$( f)(& ), ,&9"&*-& or/&r.
W& -$**o# ",& $ ,&9"&*#)$( f)(& $, $ (oo;"+.
T7& +ro!(&m C)#7 ,&9"&*#)$( f)(& C& -$**o# /)r&-#(1 Rf)(#&r roC,G $*/ 9"&r1 ), *o#
,"++or#&/.
Update actions in sequential file:
O0&r Cr)#& &?),#)*% f)(& Ir$/)o !"##o*B.
A++&*/ #o &?),#)*% f)(& Ir$/)o !"##o*B.
4$-;"+ &?),#)*% f)(& I-7&-; !o?B.
Hashed file stage:
H$,7&/ f)(& ), ",&/ #o ,#or& /$#$ )* 7$,7 f)(&.
A 7$,7 f)(& ), ,)m)($r #o $ #&?# f)(& !"# #7& /$#$ C)(( !& or%$*)E&/ ",)*% R7$,7)*%
$(%or)#7mG.
4$,)-$((1 7$,7&/ f)(& ), ",&/ for (oo;"+ +"r+o,&.
Page 32 of 243
T7& r&#r)&0$( of /$#$ )* 7$,7&/ f)(& f$,#&r !&-$",& )# ",&, G7$,7)*% $(%or)#7mG.
Update actions in Hashed file:
'(&$r f)(& !&for& C$)#)*%
4$-;"+ &?),#)*% f)(&.
S&9"&*#)$( f)(& I$(( $r& -7&-; !o?&,B.
DATABASE Stages:
ODBC Stage:
ODBC Stage ~Stage Page:
>o" -$* ",& $* OD4' ,#$%& #o &?#r$-#D Cr)#&D or $%%r&%$#& /$#$. E$-7 OD4' ,#$%& -$*
7$0& $*1 *"m!&r of )*+"#, or o"#+"#,. I*+"# ()*;, ,+&-)f1 #7& /$#$ 1o" $r& Cr)#)*%. O"#+"#
()*;, ,+&-)f1 #7& /$#$ 1o" $r& &?#r$-#)*% $*/ $*1 $%%r&%$#)o*, r&9")r&/. >o" -$* ,+&-)f1
#7& /$#$ o* $* )*+"# ()*; ",)*% $* SQ ,#$#&m&*# -o*,#r"-#&/ !1 D$#$S#$%&D $ %&*&r$#&/
9"&r1D $ ,#or&/ +ro-&/"r&D or $ ",&r5/&f)*&/ SQ 9"&r1.
GetSQLInfo= ), ",&/ #o %&# 9"o#& -7$r$-#&r $*/ ,-7&m$ /&()m)#&r, of 1o"r /$#$
,o"r-&. O+#)o*$((1 ,+&-)f1 #7& 9"o#& -7$r$-#&r ",&/ !1 #7& /$#$ ,o"r-&. 41 /&f$"(#D #7),
), ,&# #o F I/o"!(& 9"o#&,B. >o" -$* $(,o -()-; #7& Get SQLInfo !"##o* #o -o**&-# #o
#7& /$#$ ,o"r-& $*/ r&#r)&0& #7& Q"o#& -7$r$-#&r )# ",&,. A* &*#r1 of 000 I#7r&& E&ro&,B
,+&-)f)&, #7$# *o 9"o#& -7$r$-#&r ,7o"(/ !& ",&/.
O+#)o*$((1 ,+&-)f1 #7& ,-7&m$ /&()m)#&r ",&/ !1 #7& /$#$ ,o"r-&. 41 /&f$"(# #7), ), ,&#
#o. I+&r)o/B !"# 1o" -$* ,+&-)f1 $ /)ff&r&*# ,-7&m$ /&()m)#&rD or m"(#)+(& ,-7&m$
/&()m)#&r,. SoD for &?$m+(&D )/&*#)f)&r, 7$0& #7& form
No/&=S-7&m$.OC*&rPT$!(&N$m& 1o" Co"(/ &*#&r =.P )*#o #7), f)&(/. >o" -$* $(,o -()-;
#7& Get SQLInfo !"##o* #o -o**&-# #o #7& /$#$ ,o"r-& $*/ r&#r)&0& #7& S-7&m$
/&()m)#&r )# ",&,.
NLS tab= >o" -$* /&f)*& $ -7$r$-#&r ,&# m$+ for $* OD4' ,#$%& ",)*% #7& NLS
#$! of #7& ODBC Stage
The ODBC stage can handle the following SQL Server data types:
X GUID
X T)m&,#$m+
X Sm$((D$#&T)m&
ODBC Stage ~Input Page:
Page 33 of 243
Update action. S+&-)f)&, 7oC #7& /$#$ ), Cr)##&*. '7oo,& #7& o+#)o* 1o" C$*#
from #7& /ro+5/oC* (),# !o?=
Clear the table, then insert rows. D&(&#&, #7& -o*#&*#, of #7& #$!(& $*/ $//,
#7& *&C roC,.
Insert rows without clearing. I*,&r#, #7& *&C roC, )* #7& #$!(&.
Insert new or update existing rows. N&C roC, $r& $//&/ orD )f #7& )*,&r# f$)(,D
#7& &?),#)*% roC, $r& "+/$#&/.
Replace existing rows completely. D&(&#&, #7& &?),#)*% roC,D #7&* $//, #7&
*&C roC, #o #7& #$!(&.
Update existing rows only. U+/$#&, #7& &?),#)*% /$#$ roC,. If $ roC C)#7 #7&
,"++()&/ ;&1 /o&, *o# &?),# )* #7& #$!(& #7&* #7& #$!(& ), *o# "+/$#&/ !"# $ C$r*)*%
), (o%%&/.
Update existing or insert new rows. T7& &?),#)*% /$#$ roC, $r& "+/$#&/ orD )f
#7), f$)(,D *&C roC, $r& $//&/.
Call stored procedure. Wr)#&, #7& /$#$ ",)*% $ ,#or&/ +ro-&/"r&. W7&* 1o"
,&(&-# #7), o+#)o*D #7& Procedure name f)&(/ $++&$r,.
User-defined SQL. Wr)#&, #7& /$#$ ",)*% $ ",&r5/&f)*&/ SQ ,#$#&m&*#. W7&*
1o" ,&(&-# #7), o+#)o*D #7& View SQL #$! ), r&+($-&/ !1 #7& Enter SQL #$!.
Create table in target database. S&(&-# #7), -7&-; !o? )f 1o" C$*# #o
$"#om$#)-$((1 -r&$#& $ #$!(& )* #7& #$r%&# /$#$!$,& $# r"* #)m&. A #$!(& ), -r&$#&/ !$,&/
o* #7& /&f)*&/ -o("m* ,&# for #7), ,#$%&. If 1o" ,&(&-# #7), o+#)o*D $* $//)#)o*$( #$!D
Edit DDLD $++&$r,. T7), ,7oC, #7& SQ 'REATE ,#$#&m&*# #o !& ",&/ for #$!(&
%&*&r$#)o*.
Transaction Handling. T7), +$%& $((oC, 1o" #o ,+&-)f1 #7& #r$*,$-#)o* 7$*/()*%
f&$#"r&, of #7& ,#$%& $, )# Cr)#&, #o #7& OD4' /$#$ ,o"r-&. >o" -$* -7oo,& C7&#7&r #o
",& #r$*,$-#)o* %ro"+)*% or *o#D ,+&-)f1 $* ),o($#)o* (&0&(D #7& *"m!&r of roC, Cr)##&*
!&for& &$-7 -omm)#D $*/ #7& *"m!&r of roC, Cr)##&* )* &$-7 o+&r$#)o*.
Isolation Levels: R&$/ U*-omm)##&/D R&$/ 'omm)##&/D
R&+&$#$!(& R&$/D S&r)$()E$!(&D V&r,)o*)*%D $*/ A"#o5'omm)#.
Rows per transaction f)&(/. T7), ), #7& *"m!&r of roC, Cr)##&*
!&for& #7& /$#$ ), -omm)##&/ #o #7& /$#$ #$!(&. T7& /&f$"(# 0$("& ), 0D #7$# ),D $(( #7&
roC, $r& Cr)##&* !&for& !&)*% -omm)##&/ #o #7& /$#$ #$!(&.
Parameter array size f)&(/. T7), ), #7& *"m!&r of roC, Cr)##&*
$# $ #)m&. T7& /&f$"(# ), 1D #7$# ),D &$-7 roC ), Cr)##&* )* $ ,&+$r$#& o+&r$#)o*.
ODBC Stage ~Output Page:
OO
PROCESSING Stages:
TRANSFORMER Stage:
Page 34 of 243
Tr$*,form&r ,#$%&, /o *o# &?#r$-# /$#$ or Cr)#& /$#$ #o $ #$r%&# /$#$!$,&. T7&1 $r& ",&/ #o
7$*/(& &?#r$-#&/ /$#$D +&rform $*1 -o*0&r,)o*, r&9")r&/D $*/ +$,, /$#$ #o $*o#7&r
Tr$*,form&r ,#$%& or $ ,#$%& #7$# Cr)#&, /$#$ #o $ #$r%&# /$#$ #$!(&.
Tr$*,form&r ,#$%&, -$* 7$0& $*1 *"m!&r of )*+"#, $*/ o"#+"#,. T7& ()*; from #7& m$)*
/$#$ )*+"# ,o"r-& ), /&,)%*$#&/ #7& +r)m$r1 )*+"# ()*;. T7&r& -$* o*(1 !& o*& primary
input lin&D !"# #7&r& -$* !& $*1 *"m!&r of reference inputs.
Input Lin!
T7& m$)* /$#$ ,o"r-& ), 2o)*&/ #o #7& Tr$*,form&r ,#$%& 0)$ #7& +r)m$r1 ()*;D !"# #7& ,#$%&
-$* $(,o 7$0& $*1 *"m!&r of r&f&r&*-& )*+"# ()*;,.
' reference lin& represents a table loo&up. T7&,& $r& ",&/ #o +ro0)/& )*form$#)o* #7$#
m)%7# $ff&-# #7& C$1 #7& /$#$ ), -7$*%&/D !"# /o *o# ,"++(1 #7& $-#"$( /$#$ #o !& -7$*%&/.
R&f&r&*-& )*+"# -o("m*, -$* !& /&,)%*$#&/ $, ;&1 f)&(/,. >o" -$* ,+&-)f1 ;&1 &?+r&,,)o*,
#7$# $r& ",&/ #o &0$("$#& #7& ;&1 f)&(/,. T7& mo,# -ommo* ",& for #7& ;&1 &?+r&,,)o* ), #o
,+&-)f1 $* &9")52o)*D C7)-7 ), $ ()*; !&#C&&* $ +r)m$r1 ()*; -o("m* $*/ $ r&f&r&*-& ()*;
-o("m*. For &?$m+(&D )f 1o"r +r)m$r1 )*+"# /$#$ -o*#$)*, *$m&, $*/ $//r&,,&,D $*/ $
r&f&r&*-& )*+"# -o*#$)*, *$m&, $*/ +7o*& *"m!&r,D #7& r&f&r&*-& ()*; name -o("m* ),
m$r;&/ $, $ ;&1 f)&(/ $*/ #7& ;&1 &?+r&,,)o* r&f&r, #o #7& +r)m$r1 ()*;G, name -o("m*.
D"r)*% +ro-&,,)*%D #7& *$m& )* #7& +r)m$r1 )*+"# ), (oo;&/ "+ )* #7& r&f&r&*-& )*+"#. If #7&
*$m&, m$#-7D #7& r&f&r&*-& /$#$ ), -o*,o()/$#&/ C)#7 #7& +r)m$r1 /$#$. If #7& *$m&, /o *o#
m$#-7D ).&.D #7&r& ), *o r&-or/ )* #7& r&f&r&*-& )*+"# C7o,& ;&1 m$#-7&, #7& &?+r&,,)o*
%)0&*D $(( #7& -o("m*, ,+&-)f)&/ for #7& r&f&r&*-& )*+"# $r& ,&# #o #7& *"(( 0$("&.
W7&r& $ r&f&r&*-& ()*; or)%)*$#&, from $ U*)V&r,& or OD4' ,#$%&D 1o" -$* (oo; "+
m"(#)+(& roC, from #7& r&f&r&*-& #$!(&. T7& roC, $r& ,+&-)f)&/ !1 $ for&)%* ;&1D $,
o++o,&/ #o $ +r)m$r1 ;&1 ",&/ for $ ,)*%(&5roC (oo;"+.
Output Lin!
>o" -$* 7$0& $*1 *"m!&r of o"#+"# ()*;, from 1o"r Tr$*,form&r ,#$%&.
>o" m$1 C$*# #o +$,, ,om& /$#$ ,#r$)%7# #7ro"%7 #7& Tr$*,form&r ,#$%& "*$(#&r&/D !"# )#G,
();&(1 #7$# 1o"G(( C$*# #o #r$*,form /$#$ from ,om& )*+"# -o("m*, !&for& o"#+"##)*% )#
from #7& Tr$*,form&r ,#$%&.
>o" -$* ,+&-)f1 ,"-7 $* o+&r$#)o* !1 &*#&r)*% $ 4ASI' &?+r&,,)o* or !1 ,&(&-#)*% $
#r$*,form #o $++(1 #o #7& /$#$. D$#$S#$%& 7$, m$*1 !")(#5)* #r$*,form,D or 1o" -$* /&f)*&
1o"r oC* -",#om #r$*,form, #7$# $r& ,#or&/ )* #7& R&+o,)#or1 $*/ -$* !& r&",&/ $,
r&9")r&/.
T7& ,o"r-& of $* o"#+"# ()*; -o("m* ), /&f)*&/ )* #7$# -o("m*G, Derivation -&(( C)#7)* #7&
Tr$*,form&r E/)#or. >o" -$* ",& #7& E?+r&,,)o* E/)#or #o &*#&r &?+r&,,)o*, or #r$*,form,
Page 35 of 243
)* #7), -&((. >o" -$* $(,o ,)m+(1 /r$% $* )*+"# -o("m* #o $* o"#+"# -o("m*G, Derivation
-&((D #o +$,, #7& /$#$ ,#r$)%7# #7ro"%7 #7& Tr$*,form&r ,#$%&.
I* $//)#)o* #o ,+&-)f1 /&r)0$#)o* /&#$)(, for )*/)0)/"$( o"#+"# -o("m*,D 1o" -$* $(,o
,+&-)f1 -o*,#r$)*#, #7$# o+&r$#& o* &*#)r& o"#+"# ()*;,. A -o*,#r$)*# ), $ 4ASI' &?+r&,,)o*
#7$# ,+&-)f)&, -r)#&r)$ #7$# /$#$ m",# m&&# !&for& )# -$* !& +$,,&/ #o #7& o"#+"# ()*;. >o"
-$* $(,o ,+&-)f1 $ r&2&-# ()*;D C7)-7 ), $* o"#+"# ()*; #7$# -$rr)&, $(( #7& /$#$ *o# o"#+"# o*
o#7&r ()*;,D #7$# ),D -o("m*, #7$# 7$0& *o# m&# #7& -r)#&r)$.
E$-7 o"#+"# ()*; ), +ro-&,,&/ )* #"r*. If #7& -o*,#r$)*# &?+r&,,)o* &0$("$#&, #o TRUE for
$* )*+"# roCD #7& /$#$ roC ), o"#+"# o* #7$# ()*;. 'o*0&r,&(1D )f $ -o*,#r$)*# &?+r&,,)o*
&0$("$#&, #o FASE for $* )*+"# roCD #7& /$#$ roC ), *o# o"#+"# o* #7$# ()*;.
'o*,#r$)*# &?+r&,,)o*, o* /)ff&r&*# ()*;, $r& )*/&+&*/&*#. If 1o" 7$0& mor& #7$* o*&
o"#+"# ()*;D $* )*+"# roC m$1 r&,"(# )* $ /$#$ roC !&)*% o"#+"# from ,om&D *o*&D or $(( of
#7& o"#+"# ()*;,.
For &?$m+(&D )f 1o" -o*,)/&r #7& /$#$ #7$# -om&, from $ +$)*# ,7o+D )# -o"(/ )*-("/&
)*form$#)o* $!o"# $*1 *"m!&r of /)ff&r&*# -o(or,. If 1o" C$*# #o ,&+$r$#& #7& -o(or, )*#o
/)ff&r&*# f)(&,D 1o" Co"(/ ,&# "+ /)ff&r&*# -o*,#r$)*#,. >o" -o"(/ o"#+"# #7& )*form$#)o*
$!o"# %r&&* $*/ !("& +$)*# o* )*;AD r&/ $*/ 1&((oC +$)*# o* )*;4D $*/ !($-; +$)*# o*
)*;'.
W7&* $* )*+"# roC -o*#$)*, )*form$#)o* $!o"# 1&((oC +$)*#D #7& )*;A -o*,#r$)*#
&?+r&,,)o* &0$("$#&, #o FASE $*/ #7& roC ), *o# o"#+"# o* )*;A. HoC&0&rD #7& )*+"#
/$#$ /o&, ,$#),f1 #7& -o*,#r$)*# -r)#&r)o* for )*;4 $*/ #7& roC, $r& o"#+"# o* )*;4.
If #7& )*+"# /$#$ -o*#$)*, )*form$#)o* $!o"# C7)#& +$)*#D #7), /o&, *o# ,$#),f1 $*1
-o*,#r$)*# $*/ #7& /$#$ roC ), *o# o"#+"# o* )*;, AD 4 or 'D !"# C)(( !& o"#+"# o* #7&
r&2&-# ()*;. T7& r&2&-# ()*; ), ",&/ #o ro"#& /$#$ #o $ #$!(& or f)(& #7$# ), $ Z-$#-75$(([ for
roC, #7$# $r& *o# o"#+"# o* $*1 o#7&r ()*;. T7& #$!(& or f)(& -o*#$)*)*% #7&,& r&2&-#, ),
r&+r&,&*#&/ !1 $*o#7&r ,#$%& )* #7& 2o! /&,)%*.
"#for#$St%&# %n' Aft#r$St%&# Routin#!
4&-$",& #7& Tr$*,form&r ,#$%& ), $* $-#)0& ,#$%& #1+&D 1o" -$* ,+&-)f1 ro"#)*&, #o !&
&?&-"#&/ !&for& or $f#&r #7& ,#$%& 7$, +ro-&,,&/ #7& /$#$. For &?$m+(&D 1o" m)%7# ",& $
!&for&5,#$%& ro"#)*& #o +r&+$r& #7& /$#$ !&for& +ro-&,,)*% ,#$r#,. >o" m)%7# ",& $* $f#&r5
,#$%& ro"#)*& #o ,&*/ $* &(&-#ro*)- m&,,$%& C7&* #7& ,#$%& 7$, f)*),7&/.
Sp#(if)in& t*# Prim%r) Input Lin
T7& f)r,# ()*; #o $ Tr$*,form&r ,#$%& ), $(C$1, /&,)%*$#&/ $, #7& +r)m$r1 )*+"# ()*;.
HoC&0&rD 1o" -$* -7oo,& $* $(#&r*$#)0& ()*; #o !& #7& +r)m$r1 ()*; )f *&-&,,$r1. To /o
#7),=
1. S&(&-# #7& -"rr&*# +r)m$r1 )*+"# ()*; )* #7& D)$%r$m C)*/oC.
2. '7oo,& Convert to Reference from #7& D)$%r$m C)*/oC ,7or#-"# m&*".
Page 36 of 243
3. S&(&-# #7& r&f&r&*-& ()*; #7$# 1o" C$*# #o !& #7& *&C +r)m$r1 )*+"# ()*;.
4. '7oo,& Convert to Stream from #7& D)$%r$m C)*/oC ,7or#-"# m&*".
OO
AGGREGATOR Stage:
A%%r&%$#or ,#$%&, -($,,)f1 /$#$ roC, from $ ,)*%(& )*+"# ()*; )*#o %ro"+, $*/ -om+"#&
#o#$(, or o#7&r $%%r&%$#& f"*-#)o*, for &$-7 %ro"+. T7& ,"mm&/ #o#$(, for &$-7 %ro"+ $r&
o"#+"# from #7& ,#$%& 0)$ $* o"#+"# ()*;.
If 1o" C$*# #o $%%r&%$#& #7& )*+"# /$#$ )* $ *"m!&r of /)ff&r&*# C$1,D 1o" -$* 7$0&
,&0&r$( o"#+"# ()*;,D &$-7 ,+&-)f1)*% $ /)ff&r&*# ,&# of +ro+&r#)&, #o /&f)*& 7oC #7& )*+"#
/$#$ ), %ro"+&/ $*/ ,"mm$r)E&/.
OO
FOLDER Stage:
Fo(/&r ,#$%&, $r& ",&/ #o r&$/ or Cr)#& /$#$ $, f)(&, )* $ /)r&-#or1 (o-$#&/ o* #7& D$#$S#$%&
,&r0&r.
T7& fo(/&r ,#$%&, -$* r&$/ m"(#)+(& f)(&, from $ ,)*%(& /)r&-#or1 $*/ -$* /&()0&r #7& f)(&, #o
#7& 2o! $, roC, o* $* o"#+"# ()*;. T7& fo(/&r ,#$%& -$* $(,o Cr)#& roC, of /$#$ $, f)(&, #o $
/)r&-#or1. T7& roC, $rr)0& $# #7& ,#$%& o* $* )*+"# ()*;.
Note: T7& !&7$0)or of #7& Fo(/&r ,#$%& C7&* r&$/)*% fo(/&r, #7$# -o*#$)* o#7&r fo(/&r, ),
"*/&f)*&/.
I* $* NS &*0)ro*m&*#D #7& ",&r r"**)*% #7& 2o! m",# 7$0& Cr)#& +&rm),,)o* o* #7& fo(/&r
,o #7$# #7& NS m$+ )*form$#)o* -$* !& ,&# "+ -orr&-#(1.
Fo+'#r St%&# Input D%t%
T7& +ro+&r#)&, $r& $, fo((oC,=
X Preserve CRLF. W7&* Preserve CRLF ), ,&# #o Yes f)&(/ m$r;, $r& *o# -o*0&r#&/ #o
*&C()*&, o* Cr)#&. I# ), ,&# #o Yes !1 /&f$"(#.
Page 37 of 243
T7& Columns #$! /&f)*&, #7& /$#$ $rr)0)*% o* #7& ()*; #o !& Cr)##&* )* f)(&, #o #7&
/)r&-#or1. T7& f)r,# -o("m* o* #7& Columns #$! m",# !& /&f)*&/ $, $ ;&1D $*/ %)0&, #7&
*$m& of #7& f)(&. T7& r&m$)*)*% -o("m*, $r& Cr)##&* #o #7& *$m&/ f)(&D &$-7 -o("m*
,&+$r$#&/ !1 $ *&C()*&. D$#$ #o !& Cr)##&* #o $ /)r&-#or1 Co"(/ *orm$((1 !& /&()0&r&/ )* $
,)*%(& -o("m*.
Fo+'#r St%&# Output D%t%
T7& +ro+&r#)&, $r& $, fo((oC,=
X Sort order. '7oo,& from A,-&*/)*%D D&,-&*/)*%D or No*&. T7), ,+&-)f)&, #7& or/&r )*
C7)-7 #7& f)(&, $r& r&$/ from #7& /)r&-#or1.
X Wildcard. T7), $((oC, for ,)m+(& C)(/-$r/)*% of #7& *$m&, of #7& f)(&, fo"*/ )* #7&
/)r&-#or1. A*1 o--"rr&*-& of \ I$,#&r),;B or S I#7r&& +&r)o/,B ), #r&$#&/ $, $* )*,#r"-#)o*
#o m$#-7 $*1 or *o -7$r$-#&r,.
X Preserve CRLF. W7&* Preserve CRLF ), ,&# #o Yes *&C()*&, $r& *o# -o*0&r#&/ #o f)&(/
m$r;, o* r&$/. I# ), ,&# #o Yes !1 /&f$"(#.
X Fully qualified. S&# #7), #o 1&, #o 7$0& #7& f"(( +$#7 *$m& of &$-7 f)(& Cr)##&* )* #7& ;&1
-o("m* )*,#&$/ of 2",# #7& f)(& *$m&.
T7& Columns #$! /&f)*&, $ m$?)m"m of #Co -o("m*,. T7& f)r,# -o("m* m",# !& m$r;&/
$, #7& K&1 $*/ r&-&)0&, #7& f)(& *$m&. T7& ,&-o*/ -o("m*D )f +r&,&*#D r&-&)0&, #7& -o*#&*#,
of #7& f)(&.
OO
IPC Stage:
A* )*#&r5+ro-&,, IIP'B ,#$%& ), $ +$,,)0& ,#$%& C7)-7 +ro0)/&, $ -omm"*)-$#)o* -7$**&(
!&#C&&* D$#$S#$%& +ro-&,,&, r"**)*% ,)m"(#$*&o",(1 )* #7& ,$m& 2o!. I# $((oC, 1o" #o
/&,)%* 2o!, #7$# r"* o* S.P ,1,#&m, C)#7 %r&$# +&rform$*-& !&*&f)#,. To "*/&r,#$*/ #7&
!&*&f)#, of ",)*% IP' ,#$%&,D 1o" *&&/ #o ;*oC $ !)# $!o"# 7oC D$#$S#$%& 2o!, $-#"$((1
r"* $, +ro-&,,&,D ,&& ZD$#$S#$%& 3o!, $*/ Pro-&,,&,[.
T7& o"#+"# ()*; -o**&-#)*% IP' ,#$%& #o #7& ,#$%& r&$/)*% /$#$ -$* !& o+&*&/ $, ,oo* $,
#7& )*+"# ()*; -o**&-#&/ #o #7& ,#$%& Cr)#)*% /$#$ 7$, !&&* o+&*&/.
>o" -$* ",& I*#&r5+ro-&,, ,#$%&, #o 2o)* +$,,)0& ,#$%&, #o%&#7&r. For &?$m+(& 1o" -o"(/
",& #7&m #o ,+&&/ "+ /$#$ #r$*,f&r !&#C&&* #Co /$#$ ,o"r-&,=
I* #7), &?$m+(& #7& 2o! C)(( r"* $, #Co +ro-&,,&,D o*& 7$*/()*% #7& -omm"*)-$#)o* from
,&9"&*#)$( f)(& ,#$%& #o IP' ,#$%&D $*/ o*& 7$*/()*% -omm"*)-$#)o* from IP' ,#$%& #o
OD4' ,#$%&. A, ,oo* $, #7& S&9"&*#)$( F)(& ,#$%& 7$, o+&*&/ )#, o"#+"# ()*;D #7& IP' ,#$%&
Page 38 of 243
-$* ,#$r# +$,,)*% /$#$ #o #7& OD4' ,#$%&. If #7& 2o! ), r"**)*% o* $ m"(#) +ro-&,,or
,1,#&mD #7& #Co +ro-&,,or -$* r"* ,)m"(#$*&o",(1 ,o #7& #r$*,f&r C)(( !& m"-7 f$,#&r.
Defining IPC Stage Properties
T7& Properties #$! $((oC, 1o" #o ,+&-)f1 #Co +ro+&r#)&, for #7& IP' ,#$%&=
X Buffer Size. D&f$"(#, #o 12: K!. T7& IP' ,#$%& ",&, #Co !(o-;, of m&mor1P o*& !(o-;
-$* !& Cr)##&* #o C7)(& #7& o#7&r ), r&$/ from. T7), +ro+&r#1 /&f)*&, #7& ,)E& of &$-7 !(o-;D
,o #7$# !1 /&f$"(# 256 K! ), $((o-$#&/ )* #o#$(.
X Timeout. D&f$"(#, #o 10 ,&-o*/,. T7), %)0&, #)m& ()m)# for 7oC (o*% #7& ,#$%& C)(( C$)#
for $ +ro-&,, #o -o**&-# #o )# !&for& #)m)*% o"#. T7), *orm$((1 C)(( *o# *&&/ -7$*%)*%D !"#
m$1 !& )m+or#$*# C7&r& 1o" $r& +ro#o#1+)*% m"(#)5+ro-&,,or 2o!, o* ,)*%(& +ro-&,,or
+($#form, $*/ #7&r& $r& ();&(1 #o !& /&($1,.
OO
LINK PARTITIONER Stage:
T7& )*; P$r#)#)o*&r ,#$%& ), $* $-#)0& ,#$%& C7)-7 #$;&, o*& )*+"# $*/ $((oC, 1o" #o
/),#r)!"#& +$r#)#)o*&/ roC, #o "+ #o 64 o"#+"# ()*;,. T7& ,#$%& &?+&-#, #7& o"#+"# ()*;, #o
",& #7& ,$m& m&#$ /$#$ $, #7& )*+"# ()*;.
P$r#)#)o*)*% 1o"r /$#$ &*$!(&, 1o" #o #$;& $/0$*#$%& of $ m"(#)5+ro-&,,or ,1,#&m $*/ 7$0&
#7& /$#$ +ro-&,,&/ )* +$r$((&(. I# -$* !& ",&/ )* -o*2"*-#)o* C)#7 #7& )*; 'o((&-#or ,#$%&
#o +$r#)#)o* /$#$D +ro-&,, )# )* +$r$((&(D #7&* -o((&-# )# #o%&#7&r $%$)* !&for& Cr)#)*% )# #o $
,)*%(& #$r%&#. To r&$((1 "*/&r,#$*/ #7& !&*&f)#, 1o" *&&/ #o ;*oC $ !)# $!o"# 7oC
D$#$S#$%& 2o!, $r& r"* $, +ro-&,,&,D ,&& ZD$#$S#$%& 3o!, $*/ Pro-&,,&,[.
I* or/&r for #7), 2o! #o -om+)(& $*/ r"* $, )*#&*/&/ o* $ m"(#)5+ro-&,,or ,1,#&m 1o" m",#
7$0& inter(process bufferin% #"r*&/ o*D &)#7&r $# +ro2&-# (&0&( ",)*% #7& D$#$S#$%&
A/m)*),#r$#orD or $# 2o! (&0&( from #7& 1ob Properties /)$(o% !o?.
Before-Stage and After-Stage Subroutines
T7& General #$! o* #7& Stage +$%& -o*#$)*, o+#)o*$( f)&(/, #7$# $((oC 1o" #o /&f)*&
ro"#)*&, #o ",& C7)-7 $r& &?&-"#&/ !&for& or $f#&r #7& ,#$%& 7$, +ro-&,,&/ #7& /$#$.
Page 39 of 243
Before-stage subroutine $*/ Input Value. 'o*#$)* #7& *$m& I$*/ 0$("&B of $
,"!ro"#)*& #7$# ), &?&-"#&/ !&for& #7& ,#$%& ,#$r#, #o +ro-&,, $*1 /$#$. For &?$m+(&D
1o" -$* ,+&-)f1 $ ro"#)*& #7$# +r&+$r&, #7& /$#$ !&for& +ro-&,,)*% ,#$r#,.
After-stage subroutine $*/ Input Value. 'o*#$)* #7& *$m& I$*/ 0$("&B of $
,"!ro"#)*& #7$# ), &?&-"#&/ $f#&r #7& ,#$%& 7$, +ro-&,,&/ #7& /$#$. For &?$m+(&D 1o"
-$* ,+&-)f1 $ ro"#)*& #7$# ,&*/, $* &(&-#ro*)- m&,,$%& C7&* #7& ,#$%& 7$, f)*),7&/.
'7oo,& $ ro"#)*& from #7& /ro+5/oC* (),# !o?. T7), (),# !o? -o*#$)*, $(( #7& ro"#)*&,
/&f)*&/ $, $ Before/After Subroutine "*/&r #7& Routines !r$*-7 )* #7& R&+o,)#or1. E*#&r
$* $++ro+r)$#& 0$("& for #7& ro"#)*&G, )*+"# $r%"m&*# )* #7& Input Value f)&(/.
If 1o" -7oo,& $ ro"#)*& #7$# ), /&f)*&/ )* #7& R&+o,)#or1D !"# C7)-7 C$, &/)#&/ !"# *o#
-om+)(&/D $ C$r*)*% m&,,$%& r&m)*/, 1o" #o -om+)(& #7& ro"#)*& C7&* 1o" -(o,& #7& Link
Partitioner Stage /)$(o% !o?.
A r&#"r* -o/& of 0 from #7& ro"#)*& )*/)-$#&, ,"--&,,D $*1 o#7&r -o/& )*/)-$#&, f$)("r& $*/
-$",&, $ f$#$( &rror C7&* #7& 2o! ), r"*.
If 1o" )*,#$((&/ or )m+or#&/ $ 2o!D #7& Before-stage subroutine or Afterstage subroutine
f)&(/ m$1 r&f&r&*-& $ ro"#)*& #7$# /o&, *o# &?),# o* 1o"r ,1,#&m. I* #7), -$,&D $ C$r*)*%
m&,,$%& $++&$r, C7&* 1o" -(o,& #7& Link Partitioner Stage /)$(o% !o?. >o" m",# )*,#$((
or )m+or# #7& Zm),,)*%[ ro"#)*& or -7oo,& $* $(#&r*$#)0& o*& #o ",&.
Defining Link Partitioner Stage Properties
T7& Properties #$! $((oC, 1o" #o ,+&-)f1 #Co +ro+&r#)&, for #7& )*; P$r#)#)o*&r ,#$%&=
Partitioning Algorithm. U,& #7), +ro+&r#1 #o ,+&-)f1 #7& m&#7o/ #7& ,#$%& ",&, #o
+$r#)#)o* /$#$. '7oo,& from=
Round-Robin. T7), ), #7& /&f$"(# m&#7o/. U,)*% #7& ro"*/5ro!)* m&#7o/ #7& ,#$%&
C)(( Cr)#& &$-7 )*-om)*% roC #o o*& of )#, o"#+"# ()*;, )* #"r*.
Random. U,)*% #7), m&#7o/ #7& ,#$%& C)(( ",& $ r$*/om *"m!&r %&*&r$#or #o
/),#r)!"#& )*-om)*% roC, &0&*(1 $-ro,, $(( o"#+"# ()*;,.
Hash. U,)*% #7), m&#7o/ #7& ,#$%& $++()&, $ 7$,7 f"*-#)o* #o o*& or mor& )*+"#
-o("m* 0$("&, #o /&#&rm)*& C7)-7 o"#+"# ()*; #7& roC ), +$,,&/ #o.
Modulus. U,)*% #7), m&#7o/ #7& ,#$%& $++()&, $ mo/"(", f"*-#)o* #o $* )*#&%&r
)*+"# -o("m* 0$("& #o /&#&rm)*& C7)-7 o"#+"# ()*; #7& roC ), +$,,&/ #o.
Partitioning Key. T7), +ro+&r#1 ), o*(1 ,)%*)f)-$*# C7&r& 1o" 7$0& -7o,&* $
+$r#)#)o*)*% $(%or)#7m of H$,7 or .o/"(",. For #7& H$,7 $(%or)#7mD ,+&-)f1 o*& or
mor& -o("m* *$m&, ,&+$r$#&/ !1 -omm$,. T7&,& ;&1, $r& -o*-$#&*$#&/ $*/ $ 7$,7
f"*-#)o* $++()&/ #o /&#&rm)*& #7& /&,#)*$#)o* o"#+"# ()*;. For #7& .o/"(", $(%or)#7mD
,+&-)f1 $ ,)*%(& -o("m* *$m& C7)-7 )/&*#)f)&, $* )*#&%&r *"m&r)- -o("m*. T7& 0$("&
of #7), -o("m* 0$("& /&#&rm)*&, #7& /&,#)*$#)o* o"#+"# ()*;.
Defining Link Partitioner Stage Input Data
Page 40 of 243
T7& )*; P$r#)#)o*&r ,#$%& -$* 7$0& o*& )*+"# ()*;. T7), ), C7&r& #7& /$#$ #o !& +$r#)#)o*&/
$rr)0&,.
T7& I*+"#, +$%& 7$, #Co #$!,= General $*/ Columns.
General. T7& General #$! $((oC, 1o" #o ,+&-)f1 $* o+#)o*$( /&,-r)+#)o* of #7&
,#$%&.
Columns. T7& Columns #$! -o*#$)*, #7& -o("m* /&f)*)#)o*, for #7& /$#$ o* #7&
)*+"# ()*;. T7), ), *orm$((1 +o+"($#&/ !1 #7& m&#$ /$#$ of #7& ,#$%& -o**&-#)*% o* #7&
)*+"# ,)/&. >o" -$* $(,o Load $ -o("m* /&f)*)#)o* from #7& R&+o,)#or1D or #1+& o*& )*
1o"r,&(f I$*/ Save )# #o #7& R&+o,)#or1 )f r&9")r&/B. No#& #7$# #7& m&#$ /$#$ o* #7&
)*+"# ()*; m",# !& )/&*#)-$( #o #7& m&#$ /$#$ o* #7& o"#+"# ()*;,.
Defining Link Partitioner Stage Output Data
T7& )*; P$r#)#)o*&r ,#$%& -$* 7$0& "+ #o 64 o"#+"# ()*;,. P$r#)#)o*&/ /$#$ f(oC, $(o*%
#7&,& ()*;,. T7& Output Name /ro+5/oC* (),# o* #7& Outputs +$%&, $((oC, 1o" #o ,&(&-#
C7)-7 of #7& 64 ()*;, 1o" $r& (oo;)*% $#.
T7& Outputs +$%& 7$, #Co #$!,= General $*/ Columns.
General. T7& General #$! $((oC, 1o" #o ,+&-)f1 $* o+#)o*$( /&,-r)+#)o* of #7&
,#$%&.
Columns. T7& Columns #$! -o*#$)*, #7& -o("m* /&f)*)#)o*, for #7& /$#$ o* #7&
)*+"# ()*;. >o" -$* Load $ -o("m* /&f)*)#)o* from #7& R&+o,)#or1D or #1+& o*& )*
1o"r,&(f I$*/ Save )# #o #7& R&+o,)#or1 )f r&9")r&/B. No#& #7$# #7& m&#$ /$#$ o* #7&
o"#+"# ()*; m",# !& )/&*#)-$( #o #7& m&#$ /$#$ o* #7& )*+"# ()*;. So #7& m&#$ /$#$ ),
)/&*#)-$( for $(( #7& o"#+"# ()*;,.
OO
LINK COLLECTOR Stage:
T7& )*; 'o((&-#or ,#$%& ), $* $-#)0& ,#$%& C7)-7 #$;&, "+ #o 64 )*+"#, $*/ $((oC, 1o" #o
-o((&-# /$#$ from #7), ()*;, $*/ ro"#& )# $(o*% $ ,)*%(& o"#+"# ()*;. T7& ,#$%& &?+&-#, #7&
o"#+"# ()*; #o ",& #7& ,$m& m&#$ /$#$ $, #7& )*+"# ()*;,.
T7& )*; 'o((&-#or ,#$%& -$* !& ",&/ )* -o*2"*-#)o* C)#7 $ )*; P$r#)#)o*&r ,#$%& #o
&*$!(& 1o" #o #$;& $/0$*#$%& of $ m"(#)5+ro-&,,or ,1,#&m $*/ 7$0& /$#$ +ro-&,,&/ )*
+$r$((&(. T7& )*; P$r#)#)o*&r ,#$%& +$r#)#)o*, /$#$D )# ), +ro-&,,&/ )* +$r$((&(D #7&* #7& )*;
'o((&-#or ,#$%& -o((&-#, )# #o%&#7&r $%$)* !&for& Cr)#)*% )# #o $ ,)*%(& #$r%&#. To r&$((1
"*/&r,#$*/ #7& !&*&f)#, 1o" *&&/ #o ;*oC $ !)# $!o"# 7oC D$#$S#$%& 2o!, $r& r"* $,
+ro-&,,&,D ,&& ZD$#$S#$%& 3o!, $*/ Pro-&,,&,[.
Page 41 of 243
I* or/&r for #7), 2o! #o -om+)(& $*/ r"* $, )*#&*/&/ o* $ m"(#)5+ro-&,,or ,1,#&m 1o" m",#
7$0& )*#&r5+ro-&,, !"ff&r)*% #"r*&/ o*D &)#7&r $# +ro2&-# (&0&( ",)*% #7& D$#$S#$%&
A/m)*),#r$#orD or $# 2o! (&0&( from #7& 1ob Properties /)$(o% !o?.
T7& Properties #$! $((oC, 1o" #o ,+&-)f1 #Co +ro+&r#)&, for #7& )*; 'o((&-#or ,#$%&=
Collection Algorithm. U,& #7), +ro+&r#1 #o ,+&-)f1 #7& m&#7o/ #7& ,#$%& ",&, #o
-o((&-# /$#$. '7oo,& from=
Round-Robin. T7), ), #7& /&f$"(# m&#7o/. U,)*% #7& ro"*/5ro!)* m&#7o/ #7& ,#$%&
C)(( r&$/ $ roC from &$-7 )*+"# ()*; )* #"r*.
Sort/Merge. U,)*% #7& ,or#Jm&r%& m&#7o/ #7& ,#$%& r&$/, m"(#)+(& ,or#&/ )*+"#,
$*/ Cr)#&, o*& ,or#&/ o"#+"#.
Sort Key. T7), +ro+&r#1 ), o*(1 ,)%*)f)-$*# C7&r& 1o" 7$0& -7o,&* $ -o((&-#)*%
$(%or)#7m of Sor#J.&r%&. I# /&f)*&, 7oC &$-7 of #7& +$r#)#)o*&/ /$#$ ,&#, $r& ;*oC* #o
!& ,or#&/ $*/ 7oC #7& m&r%&/ o"#+"# C)(( !& ,or#&/. T7& ;&1 7$, #7& fo((oC)*% form$#=
Columnname ]sortorderL KDColumnname KsortorderLL...
Columnname ,+&-)f)&, o*& Ior mor&B -o("m*, #o ,or# o*.
sortorder /&f)*&, #7& ,or# or/&r $, fo((oC,=
I* $* NS &*0)ro*m&*#D #7& -o(($#& -o*0&*#)o* of #7& (o-$(& m$1 $ff&-# #7& ,or# or/&r. T7&
/&f$"(# -o(($#& -o*0&*#)o* ), ,&# )* #7& D$#$S#$%& A/m)*),#r$#orD !"# -$* !& ,&# for
)*/)0)/"$( 2o!, )* #7& 1ob Properties /)$(o% !o?.
Ascending Order Descending Order
A /
$,- /,-
$,-&*/)*% /&,-&*/)*%
A D
AS' DS'
AS'ENDING DES'ENDING
For example:
FIRSTNA.E /D SURNA.E D
Page 42 of 243
S+&-)f)&, #7$# roC, $r& ,or#&/ $--or/)*% #o FIRSTNA.E -o("m* $*/ SURNA.E -o("m*
)* /&,-&*/)*% or/&r.
T7& )*; 'o((&-#or ,#$%& -$* 7$0& "+ #o 64 )*+"# ()*;,. T7), ), C7&r& #7& /$#$ #o !&
-o((&-#&/ $rr)0&,. T7& Input Name /ro+5/oC* (),# o* #7& Inputs +$%& $((oC, 1o" #o ,&(&-#
C7)-7 of #7& 64 ()*;, 1o" $r& (oo;)*% $#.
T7& )*; 'o((&-#or ,#$%& -$* 7$0& $ ,)*%(& o"#+"# ()*;.
DATASTAGE TUTORIAL
1. About DataStage
2. Client
Components
3. DataStage
Designer.
4. DataStage
Director
5. DataStage
Manager
6. DataStage
Administrator
7. DataStage
Manager Roles
8. Server
Components
9. DataStage
Features
10. Types of 1obs
11. DataStage NLS
12. 1OB
13. Aggregator
14. Hashed File
15. UniVerse
16. UniData.
17. ODBC
18. Sequential File
19. Folder Stage
20. Transformer
21. Container
22. IPC Stage
23. Link Collector
Stage
24. Link Partitioner
Stage
25. Server 1ob
Properties
26. Containers
27. Local containers
28. Shared containers
29. 1ob Sequences
Page 43 of 243
About DataStage
D$#$S#$%& ), $ #oo( ,&# for /&,)%*)*%D /&0&(o+)*%D $*/ r"**)*%
$++()-$#)o*, #7$# +o+"($#& o*& or mor& #$!(&, )* $ /$#$
C$r&7o",& or /$#$ m$r#. I# -o*,),#, of -()&*# $*/ ,&r0&r
-om+o*&*#,.
Client Components
DataStage Designer.
A /&,)%* )*#&rf$-& ",&/ #o -r&$#& D$#$S#$%& $++()-$#)o*,
I;*oC* $, 2o!,B. E$-7 2o! ,+&-)f)&, #7& /$#$ ,o"r-&,D #7&
#r$*,form, r&9")r&/D $*/ #7& /&,#)*$#)o* of #7& /$#$. 3o!,
$r& -om+)(&/ #o -r&$#& &?&-"#$!(&, #7$# $r& ,-7&/"(&/ !1
#7& D)r&-#or $*/ r"* !1 #7& S&r0&r.
DataStage Director.
A ",&r )*#&rf$-& ",&/ #o 0$()/$#&D ,-7&/"(&D r"*D $*/
mo*)#or D$#$S#$%& 2o!,.
DataStage Manager.
A ",&r )*#&rf$-& ",&/ #o 0)&C $*/ &/)# #7& -o*#&*#, of #7&
R&+o,)#or1.
DataStage Administrator
A ",&r )*#&rf$-& ",&/ #o -o*f)%"r& D$#$S#$%&
DataStage Manager Roles
Im+or# #$!(& or ,#or&/ +ro-&/"r& /&f)*)#)o*,
'r&$#& #$!(& or ,#or&/ +ro-&/"r& /&f)*)#)o*,D /$#$
&(&m&*#,D -",#om #r$*,form,D ,&r0&r 2o! ro"#)*&,D
m$)*fr$m& ro"#)*&,D m$-7)*& +rof)(&,D $*/ +("%5)*,
T7&r& $r& $(,o mor& ,+&-)$()E&/ #$,;, #7$# -$* o*(1 !&
+&rform&/ from #7& D$#$S#$%& .$*$%&r. T7&,& )*-("/&=
P&rform ",$%& $*$(1,), 9"&r)&,.
R&+or# o* R&+o,)#or1 -o*#&*#,.
Im+or#)*%D &?+or#)*% $*/ +$-;$%)*% D$#$S#$%& 2o!,.
Page 44 of 243
Server Components
T7&r& $r& #7r&& ,&r0&r -om+o*&*#, C7)-7 $r& )*,#$((&/ o* $
,&r0&r=
Repository. A -&*#r$( ,#or& #7$# -o*#$)*, $(( #7&
)*form$#)o* r&9")r&/ #o !")(/ $ /$#$ m$r# or /$#$
C$r&7o",&.
DataStage Server. R"*, &?&-"#$!(& 2o!, #7$# &?#r$-#D
#r$*,formD $*/ (o$/ /$#$ )*#o $ /$#$ C$r&7o",&.
DataStage Package Installer. A ",&r )*#&rf$-& ",&/
#o )*,#$(( +$-;$%&/ D$#$S#$%& 2o!, $*/ +("%5)*,.
DataStage Features
E?#r$-#, /$#$ from $*1 *"m!&r or #1+&, of /$#$!$,&
H$*/(&, $(( #7& m&#$ /$#$ /&f)*)#)o*, r&9")r&/ #o /&f)*& 1o"r
/$#$ C$r&7o",&.
A%%r&%$#&, /$#$. >o" -$* mo/)f1 SQ SEE'T ,#$#&m&*#,
",&/ #o &?#r$-# /$#$.
Tr$*,form, /$#$. D$#$S#$%& 7$, $ ,&# of +r&/&f)*&/ #r$*,form,
$*/ f"*-#)o*, 1o" -$* ",& #o -o*0&r# 1o"r /$#$.
o$/, #7& /$#$ C$r&7o",&
Types of jobs
T7&r& $r& #7r&& !$,)- #1+&, of D$#$S#$%& 2o!=
Server jobs. T7&,& $r& -om+)(&/ $*/ r"* o* #7&
D$#$S#$%& ,&r0&r. A ,&r0&r 2o! C)(( -o**&-# #o
/$#$!$,&, o* o#7&r m$-7)*&, $, *&-&,,$r1D &?#r$-#
/$#$D +ro-&,, )#D #7&* Cr)#& #7& /$#$ #o #7& #$r%&# /$#$
C$r&7o",&.
Parallel jobs. T7&,& $r& $0$)($!(& o*(1 )f 1o" 7$0&
E*#&r+r),& E/)#)o* )*,#$((&/. P$r$((&( 2o!, $r& -om+)(&/
$*/ r"* o* $ D$#$S#$%& UNIH ,&r0&rD $*/ -$* !& r"*
)* +$r$((&( o* S.PD .PPD $*/ -(",#&r ,1,#&m,.
Mainframe jobs. T7&,& $r& $0$)($!(& o*(1 )f 1o" 7$0&
E*#&r+r),& .VS E/)#)o* )*,#$((&/. A m$)*fr$m& 2o! ),
-om+)(&/ $*/ r"* o* #7& m$)*fr$m&. D$#$ &?#r$-#&/ !1
,"-7 2o!, ), #7&* (o$/&/ )*#o #7& /$#$ C$r&7o",&.
Page 45 of 243
T7&r& $r& #Co o#7&r &*#)#)&, #7$# $r& ,)m)($r #o 2o!, )* #7& C$1
#7&1 $++&$r )* #7& D$#$S#$%& D&,)%*&rD $*/ $r& 7$*/(&/ !1 )#.
T7&,& $r&=
Shared containers.
T7&,& $r& r&",$!(& 2o! &(&m&*#,. T7&1 #1+)-$((1 -om+r),&
$ *"m!&r of ,#$%&, $*/ ()*;,. 'o+)&, of ,7$r&/ -o*#$)*&r,
-$* !& ",&/ )* $*1 *"m!&r of ,&r0&r 2o!, $*/ &/)#&/ $,
r&9")r&/.
1ob Sequences.
A 2o! ,&9"&*-& $((oC, 1o" #o ,+&-)f1 $ ,&9"&*-& of
D$#$S#$%& 2o!, #o !& &?&-"#&/D $*/ $-#)o*, #o #$;&
/&+&*/)*% o* r&,"(#,
DataStage NS
Pro-&,, /$#$ )* $ C)/& r$*%& of ($*%"$%&,
A--&+# /$#$ )* $*1 -7$r$-#&r ,&# )*#o mo,# D$#$S#$%&
f)&(/,
U,& (o-$( form$#, for /$#&,D #)m&,D $*/ mo*&1 IS&r0&r
3o!,B
Sor# /$#$ $--or/)*% #o (o-$( r"(&,
!"#
A 2o! -o*,),#, of ,#$%&, ()*;&/ #o%&#7&r C7)-7 /&,-r)!& #7&
f(oC of /$#$ from $ /$#$ ,o"r-& #o $ f)*$( /$#$ C$r&7o",&.
#uilt$%n Stages & Server !obs
Aggregator.
A%%r&%$#or ,#$%&, $r& $-#)0& ,#$%&, #7$# -($,,)f1 /$#$ roC,
from $ ,)*%(& )*+"# ()*; )*#o %ro"+, $*/ -om+"#& #o#$(, or
o#7&r $%%r&%$#& f"*-#)o*, for &$-7 %ro"+. T7& ,"mm&/ #o#$(,
for &$-7 %ro"+ $r& o"#+"# from #7& ,#$%& 0)$ $* o"#+"# ()*;.
'as(ed File.
E?#r$-#, /$#$ from or (o$/, /$#$ )*#o /$#$!$,&, #7$#
-o*#$)* 7$,7&/ f)(&,. A(,o $-#, $, $* )*#&rm&/)$#& ,#$%& for
9")-; (oo;"+,.
H$,7&/ F)(& ,#$%&, r&+r&,&*# $ 7$,7&/ f)(&D ).&.D $ f)(& #7$# ",&,
$ 7$,7)*% $(%or)#7m for /),#r)!"#)*% r&-or/, )* o*& or mor&
%ro"+, o* /),;. >o" -$* ",& $ H$,7&/ F)(& ,#$%& #o &?#r$-# or
Page 46 of 243
Cr)#& /$#$D or #o $-# $, $* )*#&rm&/)$#& f)(& )* $ 2o!. T7&
+r)m$r1 ro(& of $ H$,7&/ F)(& ,#$%& ), $, $ r&f&r&*-& #$!(&
!$,&/ o* $ ,)*%(& ;&1 f)&(/.
E$-7 H$,7&/ F)(& ,#$%& -$* 7$0& $*1 *"m!&r of )*+"#, or
o"#+"#,. I*+"# ()*;, ,+&-)f1 #7& /$#$ 1o" $r& Cr)#)*%. O"#+"#
()*;, ,+&-)f1 #7& /$#$ 1o" $r& &?#r$-#)*%.
)ni*erse.
E?#r$-#, /$#$ from or (o$/, /$#$ )*#o U*)V&r,&
/$#$!$,&,.
)niData.
E?#r$-#, /$#$ from or (o$/, /$#$ )*#o U*)D$#$
/$#$!$,&,.
"D#C.
E?#r$-#, /$#$ from or (o$/, /$#$ )*#o /$#$!$,&, #7$# ,"++or#
#7& )*/",#r1 ,#$*/$r/ O+&* D$#$!$,& 'o**&-#)0)#1 API. T7),
,#$%& ), $(,o ",&/ $, $* )*#&rm&/)$#& ,#$%& for $%%r&%$#)*%
/$#$.
OD4' ,#$%&, $r& ",&/ #o r&+r&,&*# $ /$#$!$,& #7$# ,"++or#,
#7& )*/",#r1 ,#$*/$r/ O+&* D$#$!$,& 'o**&-#)0)#1 API. >o"
-$* ",& $* OD4' ,#$%& #o &?#r$-#D Cr)#&D or $%%r&%$#& /$#$.
E$-7 OD4' ,#$%& -$* 7$0& $*1 *"m!&r of )*+"#, or o"#+"#,.
I*+"# ()*;, ,+&-)f1 #7& /$#$ 1o" $r& Cr)#)*%. O"#+"# ()*;,
,+&-)f1 #7& /$#$ 1o" $r& &?#r$-#)*% $*/ $*1 $%%r&%$#)o*,
r&9")r&/.
Se+uential File.
E?#r$-#, /$#$ from or (o$/, /$#$ )*#o Ff($# f)(&,F )* #7&
W)*/oC, NT f)(& ,1,#&m.
S&9"&*#)$( F)(& ,#$%&, $r& ",&/ #o &?#r$-# /$#$ fromD or Cr)#&
/$#$ #oD $ #&?# f)(& )* #7& ,&r0&r f)(& ,1,#&m. T7& #&?# f)(& -$* !&
-r&$#&/ or &?),# o* $*1 /r)0& #7$# ), &)#7&r (o-$( or m$++&/ #o
#7& ,&r0&r. E$-7 S&9"&*#)$( F)(& ,#$%& -$* 7$0& $*1 *"m!&r of
)*+"#, or o"#+"#,.
Page 47 of 243
Folder Stage.
Fo(/&r ,#$%&, $r& ",&/ #o r&$/ or Cr)#& /$#$ $, f)(&, )* $
/)r&-#or1 (o-$#&/ o* #7& D$#$S#$%& ,&r0&r.
Fo(/&r ,#$%&, $r& ",&/ #o r&$/ or Cr)#& /$#$ $, f)(&, )* $
/)r&-#or1.
T7& fo(/&r ,#$%&, -$* r&$/ m"(#)+(& f)(&, from $ ,)*%(&
/)r&-#or1 $*/ -$* /&()0&r #7& f)(&, #o #7& 2o! $, roC, o* $*
o"#+"# ()*;. 41 /&f$"(#D #7& f)(& -o*#&*# ), /&()0&r&/ C)#7
*&C()*&, -o*0&r#&/ #o -7$rI254B f)&(/ m$r;,. T7& fo(/&r ,#$%&
-$* $(,o Cr)#& roC, of /$#$ $, f)(&, #o $ /)r&-#or1. T7& roC,
$rr)0& $# #7& ,#$%& o* $* )*+"# ()*;.
Transformer.
R&-&)0&, )*-om)*% /$#$D #r$*,form, )# )* $ 0$r)&#1 of C$1,D
$*/ o"#+"#, )# #o $*o#7&r ,#$%& )* #7& 2o!.
Tr$*,form&r ,#$%&, /o *o# &?#r$-# /$#$ or Cr)#& /$#$ #o $ #$r%&#
/$#$!$,&. T7&1 $r& ",&/ #o 7$*/(& &?#r$-#&/ /$#$D +&rform $*1
-o*0&r,)o*, r&9")r&/D $*/ +$,, /$#$ #o $*o#7&r Tr$*,form&r
,#$%& or $ ,#$%& #7$# Cr)#&, /$#$ #o $ #$r%&# /$#$ #$!(&.
Tr$*,form&r ,#$%&, )* ,&r0&r 2o!, -$* 7$0& $*1 *"m!&r of
)*+"#, $*/ o"#+"#,. T7& ()*; from #7& m$)* /$#$ )*+"# ,o"r-&
), /&,)%*$#&/ #7& +r)m$r1 )*+"# ()*;. T7&r& -$* o*(1 !& o*&
+r)m$r1 )*+"# ()*;D !"# #7&r& -$* !& $*1 *"m!&r of r&f&r&*-&
)*+"#,.
Container.
R&+r&,&*#, $ %ro"+ of ,#$%&, $*/ ()*;,. T7& %ro"+ ), r&+($-&/
!1 $ ,)*%(& 'o*#$)*&r ,#$%& )* #7& D)$%r$m C)*/oC.
%,C Stage.
Pro0)/&, $ -omm"*)-$#)o* -7$**&( !&#C&&* D$#$S#$%&
+ro-&,,&, r"**)*% ,)m"(#$*&o",(1 )* #7& ,$m& 2o!. I# $((oC,
1o" #o /&,)%* 2o!, #7$# r"* o* S.P ,1,#&m, C)#7 %r&$#
+&rform$*-& !&*&f)#,
.A* )*#&r5+ro-&,, IIP'B ,#$%& ), $ +$,,)0& ,#$%& C7)-7
+ro0)/&, $ -omm"*)-$#)o* -7$**&( !&#C&&* D$#$S#$%&
+ro-&,,&, r"**)*% ,)m"(#$*&o",(1 )* #7& ,$m& 2o!. I# $((oC,
1o" #o /&,)%* 2o!, #7$# r"* o* S.P ,1,#&m, C)#7 %r&$#
Page 48 of 243
+&rform$*-& !&*&f)#,. To "*/&r,#$*/ #7& !&*&f)#, of ",)*% IP'
,#$%&,D 1o" *&&/ #o ;*oC $ !)# $!o"# 7oC D$#$S#$%& 2o!,
$-#"$((1 r"* $, +ro-&,,&,D ,&& '7$+#&r 2 of #7& #erver Job
Developer$s %uide for )*form$#)o*.
T7& o"#+"# ()*; -o**&-#)*% IP' ,#$%& #o #7& ,#$%& r&$/)*% /$#$
-$* !& o+&*&/ $, ,oo* $, #7& )*+"# ()*; -o**&-#&/ #o #7& ,#$%&
Cr)#)*% /$#$ 7$, !&&* o+&*&/.
>o" -$* ",& I*#&r5+ro-&,, ,#$%&, #o 2o)* +$,,)0& ,#$%&,
#o%&#7&r. For &?$m+(& 1o" -o"(/ ",& #7&m #o ,+&&/ "+ /$#$
#r$*,f&r !&#C&&* #Co /$#$ ,o"r-&,
in- Collector Stage.
T$;&, "+ #o 64 )*+"#, $*/ $((oC, 1o" #o -o((&-# /$#$ from
#7&,& ()*;, $*/ ro"#& )# $(o*% $ ,)*%(& o"#+"# ()*;.
T7& )*; 'o((&-#or ,#$%& ), $* $-#)0& ,#$%& C7)-7 #$;&, "+ #o
64 )*+"#, $*/ $((oC, 1o" #o -o((&-# /$#$ from #7&,& ()*;, $*/
ro"#& )# $(o*% $ ,)*%(& o"#+"# ()*;. T7& ,#$%& &?+&-#, #7&
o"#+"# ()*; #o ",& #7& ,$m& m&#$ /$#$ $, #7& )*+"# ()*;,
in- ,artitioner Stage.
T$;&, o*& )*+"# $*/ $((oC, 1o" #o /),#r)!"#& +$r#)#)o*&/
roC, #o "+ #o 64 o"#+"# ()*;,.
T7& )*; P$r#)#)o*&r ,#$%& ), $* $-#)0& ,#$%& C7)-7 #$;&,
o*& )*+"# $*/ $((oC, 1o" #o /),#r)!"#& +$r#)#)o*&/ roC, #o
"+ #o 64 o"#+"# ()*;,. T7& ,#$%& &?+&-#, #7& o"#+"# ()*;, #o
",& #7& ,$m& m&#$ /$#$ $, #7& )*+"# ()*;.
Container Input $*/ Container Output. R&+r&,&*#
#7& )*#&rf$-& #7$# ()*;, $ -o*#$)*&r ,#$%& #o #7& r&,# of
#7& 2o! /&,)%*.
Server !ob ,roperties
T7& 1ob Properties /)$(o% !o? $++&$r,. T7& /)$(o% !o?
/)ff&r, /&+&*/)*% o* C7&#7&r )# ), $ ,&r0&r 2o!D $ m$)*fr$m&
2o!D or $ 2o! ,&9"&*-&.
A ,&r0&r 2o! 7$, "+ #o ,)? +$%&,= G&*&r$(D P$r$m&#&r,D 3o!
-o*#ro(D NSD P&rform$*-&D $*/ D&+&*/&*-)&,. No#& #7$# #7&
NLS +$%& ), *o# $0$)($!(& )f 1o" o+&* #7& /)$(o% !o? from #7&
.$*$%&rD &0&* )f 1o" 7$0& NS )*,#$((&/.
Page 49 of 243
Containers
A -o*#$)*&r ), $ %ro"+ of ,#$%&, $*/ ()*;,. 'o*#$)*&r, &*$!(&
1o" #o ,)m+()f1 $*/ mo/"($r)E& 1o"r ,&r0&r 2o! /&,)%*, !1
r&+($-)*% -om+(&? $r&$, of #7& /)$%r$m C)#7 $ ,)*%(&
-o*#$)*&r ,#$%&. >o" -$* $(,o ",& ,7$r&/ -o*#$)*&r, $, $ C$1
of )*-or+or$#)*% ,&r0&r 2o! f"*-#)o*$()#1 )*#o +$r$((&( 2o!,.
D$#$S#$%& +ro0)/&, #Co #1+&, of -o*#$)*&r=
ocal containers.
T7&,& $r& -r&$#&/ C)#7)* $ 2o! $*/ $r& o*(1 $--&,,)!(&
!1 #7$# 2o!. A (o-$( -o*#$)*&r ), &/)#&/ )* $ #$!!&/
+$%& of #7& 2o!G, D)$%r$m C)*/oC.
S(ared containers.
T7&,& $r& -r&$#&/ ,&+$r$#&(1 $*/ $r& ,#or&/ )* #7&
R&+o,)#or1 )* #7& ,$m& C$1 #7$# 2o!, $r&. T7&r& $r&
#Co #1+&, of ,7$r&/ -o*#$)*&r=
!ob Se+uences
D$#$S#$%& +ro0)/&, $ %r$+7)-$( 3o! S&9"&*-&r C7)-7 $((oC,
1o" #o ,+&-)f1 $ ,&9"&*-& of ,&r0&r or +$r$((&( 2o!, #o r"*. T7&
,&9"&*-& -$* $(,o -o*#$)* -o*#ro( )*form$#)o*D for &?$m+(&D
1o" -$* ,+&-)f1 /)ff&r&*# -o"r,&, of $-#)o* #o #$;& /&+&*/)*%
o* C7&#7&r $ 2o! )* #7& ,&9"&*-& ,"--&&/, or f$)(,. O*-& 1o"
7$0& /&f)*&/ $ 2o! ,&9"&*-&D )# -$* !& ,-7&/"(&/ $*/ r"*
",)*% #7& D$#$S#$%& D)r&-#or. I# $++&$r, )* #7& D$#$S#$%&
R&+o,)#or1 $*/ )* #7& D$#$S#$%& D)r&-#or -()&*# $, $ 2o!.
Page 50 of 243
LEARN FEATURES OF DATASTAGE
DATASTA./0
DataStage has the following features to aid the
design and processing required to build a data
warehouse:
Uses graphical design tools. With simple
point-and-click techniques you can draw a
scheme to represent your processing
requirements.
Etracts data from any number or type of
database.
!andles all the metadata definitions required
to define your data warehouse. "ou can
#iew and modify the table definitions at
any point during the design of your
application.
$ggregates data. "ou can modify S%& SE&E'(
statements used to etract data.
(ransforms data. DataStage has a set of
predefined transforms and functions you
can use to con#ert your data. "ou can
Page 51 of 243
easily etend the functionality by defining
your own transforms to use.
&oads the data warehouse.

C"M,"N/NTS "F DATASTA./0
DataStage consists of a number of client and
ser#er components. DataStage has four client
components
1. DataStage Designer. $ design interface
used to create DataStage applications
)known as *obs+. Each *ob specifies the
data sources, the transforms required, and
the destination of the data. -obs are
compiled to create eecutables that are
scheduled by the Director and run by the
Ser#er )mainframe *obs are transferred
and run on the mainframe+.
2. DataStage Director. $ user interface
used to #alidate, schedule, run, and
monitor DataStage ser#er *obs and parallel
*obs.
3. DataStage Manager. $ user interface
used to #iew and edit the contents of the
.epository.
4. DataStage Administrator. $ user
interface used to perform administration
tasks such as setting up DataStage users,
creating and mo#ing pro*ects, and setting
up purging criteria.
S/R*/R C"M,"N/NTS0
(here are three ser#er components:
1. Repository. $ central store that contains
all the information required to build a
data mart or data warehouse.
2. DataStage Server. .uns eecutable *obs
that etract, transform, and load data into
a data warehouse.
3. DataStage ,ac-age %nstaller. $ user
interface used to install packaged
DataStage *obs and plug-ins.
Page 52 of 243
DATASTA./ ,R"!/CTS0
"ou always enter DataStage through a DataStage
pro*ect. When you start a DataStage client you
are prompted to attach to a pro*ect. Each pro*ect
contains:
DataStage *obs.
/uilt-in components. (hese are predefined
components used in a *ob.
User-defined components. (hese are
customi0ed components created using the
DataStage 1anager. Each user-defined
component performs a specific task in a
*ob.
DATASTA./ !"#S0
(here are three basic types of DataStage *ob:
1. Server jobs. (hese are compiled and run
on the DataStage ser#er. $ ser#er *ob will
connect to databases on other machines as
necessary, etract data, process it, then
write the data to the target
datawarehouse.
2. ,arallel jobs. (hese are compiled and run
on the DataStage ser#er in a similar way to
ser#er *obs, but support parallel processing
on S12, 122, and cluster systems.
3. Mainframe jobs. (hese are a#ailable only
if you ha#e Enterprise 13S Edition
installed. $ mainframe *ob is compiled and
run on the mainframe. Data etracted by
such *obs is then loaded into the data
warehouse.
S,/C%A /NT%T%/S0
S(ared containers. (hese are reusable
*ob elements. (hey typically comprise a
number of stages and links. 'opies of
shared containers can be used in any
number of ser#er *obs or parallel *obs and
edited as required.
!ob Se+uences. $ *ob sequence allows
you to specify a sequence of DataStage
Page 53 of 243
*obs to be eecuted, and actions to take
depending on results.
T1,/S "F STA./S0
#uilt$in stages. Supplied with DataStage
and used for etracting aggregating,
transforming, or writing data. $ll types of
*ob ha#e these stages.
,lug$in stages. $dditional stages that can
be installed in DataStage to perform
speciali0ed tasks that the built-in stages do
not support Ser#er *obs and parallel *obs
can make use of these.
!ob Se+uence Stages. Special built-in
stages which allow you to define
sequences of acti#ities to run. 4nly -ob
Sequences ha#e these.
DATASTA./ NS0
DataStage has built-in 5ational &anguage
Support )5&S+. With 5&S installed, DataStage can
do the following:
2rocess data in a wide range of languages
$ccept data in any character set into most
DataStage fields
Use local formats for dates, times, and
money )ser#er *obs+
Sort data according to local rules
(o load a data mart or data warehouse, you must
do the following:
Set up your pro*ect
'reate a *ob
De#elop the *ob
Edit the stages in the *ob
'ompile the *ob
.un the *ob
Page 54 of 243
S/TT%N. ), 1")R ,R"!/CT0
/efore you create any DataStage *obs, you must
set up your pro*ect by entering information about
your data. (his includes the name and location of
the tables or files holding your data and a
definition of the columns they contain.
6nformation is stored in table definitions in the
.epository.
START%N. T'/ DATASTA./ D/S%.N/R0
(o start the DataStage Designer, choose Start 2
,rograms 2 Ascential DataStage 2
DataStage Designer. (he Attac( to ,roject
dialog bo appears:
T" C"NN/CT T" A ,R"!/CT0
1. Enter the name of your host in the 'ost
system field. (his is the name of the
system where the DataStage Ser#er
components are installed.
2. Enter your user name in the )ser name
field. (his is your user name on the ser#er
system.
3. Enter your password in the ,ass3ord
field.
4. 'hoose the pro*ect to connect to from the
,roject drop-down list bo.
5. 'lick "4. (he DataStage Designer window
appears with the Ne3 dialog bo open,
ready for you to create a new *ob:
Page 55 of 243
CR/AT%N. A !"#0
-obs are created using the DataStage Designer.
7or this eample, you need to create a ser#er
*ob, so double-click the 5ew Ser#er -ob icon.
'hoose File 2 Save to sa#e the *ob.
(he Create ne3 job dialog bo appears:
Page 56 of 243
D/F%N%N. TA#/ D/F%N%T%"NS0
7or most data sources, the quickest and simplest
way to specify a table definition is to import it
directly from your data source or data
warehouse.
%M,"RT%N. TA#/ D/F%N%T%"NS0
1. 6n the .epository window of the DataStage
Designer, select the (able Definitions
branch, and choose %mport *
Table Definitions5 from the shortcut
menu. (he %mport Metadata 6"D#C
Tables7 dialog bo appears:
2. 'hoose data Source 5ame from the DSN
drop-down list bo.
3. 'lick "4. (he updated %mport Metadata 6
"D#C Tables7 dialog bo displays all the
files for the chosen data source name:
Page 57 of 243
4. Select project./8AM,/9 from the
Tables list bo, where project is the name
of your DataStage pro*ect.
5. 'lick "4. (he column information from
EXAMPLE1 is imported into DataStage.
6. $ table definition is created and is stored
under the Table Definitions 2 "D#C 2
DSNNAM/ branch in the .epository. (he
updated DataStage Designer window
displays the new table definition entry in
the .epository window.
D/*/",%N. A !"#0
-obs are designed and de#eloped using the
Designer. (he *ob design is de#eloped in the
Diagram window )the one with grid lines+. Each
data source, the data warehouse, and each
processing step is represented by a stage in the
*ob design. (he stages are linked together to
show the flow of data.
7or Eample we can de#elop a *ob with the
following three stages:
$ Uni#erse stage to represent EXAMPLE1 )the
data source+.
8 $ (ransformer stage to con#ert the data in the
D$(E column from an YYYY-MM-DD date in
internal date format to a string gi#ing *ust year
and month )YYYY-MM+.
8 $ Sequential 7ile stage to represent the file
created at run time )the data warehouse in this
eample+.
Page 58 of 243
Adding Stages0
Stages are added using the tool palette. (his
palette contains icons that represent the
components you can add to a *ob. (he palette
has different groups to organi0e the tools
a#ailable.
To add a stage0
9. 'lick the stage button on the tool palette that
represents the stage type you want to add.
:. 'lick in the Diagram window where you want
the stage to be positioned. (he stage appears in
the Diagram window as a square. "ou can also
drag items from the palette to the Diagram
window.
We recommend that you position your stages as
follows:
Data sources on the left
Data warehouse on the right
(ransformer stage in the center
When you add stages, they are automatically
assigned default names. (hese names are based
on the type of stage and the number of the item
in the Diagram window. "ou can use the default
names in the eample.
4nce all the stages are in place, you can link
them together to show the flow of data.
in-ing Stages
"ou need to add two links:
Page 59 of 243
8 4ne between the Uni#erse and (ransformer
stages
8 4ne between the (ransformer and Sequential
7ile stages
&inks are always made in the direction the data
will flow, that is, usually left to right. When you
add links, they are assigned default names. "ou
can use the default names in the eample.
To add a lin-0
9. .ight-click the first stage, hold the mouse
button down and drag the link to the transformer
stage. .elease the mouse button.
:. .ight-click the (ransformer stage and drag the
link to the Sequential 7ile stage.
(he following screen shows how the Diagram
window looks when you ha#e added the stages
and links:
/diting t(e Stages
"our *ob design currently displays the stages and
the links between them. "ou must edit each
stage in the *ob to specify the data to use and
what to do with it. Stages are edited in the *ob
design by double-clicking each stage in turn.
Each stage type has its own editor.
/diting t(e )ni*erse Stage
(he data source )EXAMPLE1+ is represented by a
Uni3erse stage. "ou must specify the data you
Page 60 of 243
want to etract from this file by editing the
stage.
Double-click the stage to edit it. (he )ni*erse
Stage dialog bo appears:
(his dialog bo has two pages:
8 Stage. Displayed by default. (his page
contains the name of the stage you are editing.
(he .eneral tab specifies where the file is found
and the connection type.
8 "utputs. 'ontains information describing the
data flowing from the stage. "ou edit this page to
describe the data you want to etract from the
file. 6n this eample, the output from this stage
goes to the (ransformer stage. (o edit the
Uni#erse stage:
9. 'heck that you are displaying the .eneral tab
on the Stage page.
'hoose localuv from the Data source name
drop-down list. ocaluv is where EXAMPLE1 is
copied to during installation.
(he remaining parameters on the .eneral and
Details tabs are used to enter logon details and
describe where to find the file. /ecause
EXAMPLE1 is installed in localuv, you do not
ha#e to complete these fields, which are
disabled.
:. 'lick the "utputs tab. (he "utputs page
appears:
Page 61 of 243
(he "utputs page contains the name of the link
the data flows along and the following four tabs:
8 .eneral. 'ontains the name of the table to use
and an optional description of the link.
8 Columns. 'ontains information about the
columns in the table.
8 Selection. Used to enter an optional S%&
SE&E'( clause )an Advanced procedure+.
8 *ie3 S:. Displays the S%& SE&E'( statement
used to etract the data.
;. 'hoose dstage./8AM,/9 from the
Available tables drop-down list.
<. 'lick Add to add dstage./8AM,/9 to the
Table names field.
=. 'lick the Columns tab. (he Columns tab
appears at the front of the dialog bo. "ou must
specify the columns contained in the file you
want to use. /ecause the column definitions are
stored in a table definition in the .epository, you
can load them directly.
>. 'lick oad5. (he (able Definitions window
appears with then )ni*erse localuv branch
highlighted.
?. Select dstage./8AM,/9. (he Select
Columns dialog bo appears, allowing you to
select which column definitions you want to load.
@. 6n this case you want to load all a#ailable
columns definitions, so *ust click "4. (he column
definitions specified in the table definition are
copied to the stage. (he Columns tab contains
definitions for the four columns in EXAMPLE1:
Page 62 of 243
A. "ou can use the Data /rowser to #iew the
actual data that is to be output from the
Uni3erse stage. 'lick the *ie3 Data5 button to
open the Data /rowser window.
99. 'hoose File 2 Save to sa#e your *ob design
so far.
/diting t(e Transformer Stage
(he (ransformer stage performs any data
con#ersion required before the data is output to
another stage in the *ob design. 6n this eample,
the (ransformer stage is used to con#ert the
data in the D$(E column from an YYYYMM-DD
Page 63 of 243
date in internal date format to a string gi#ing *ust
the year and month )YYYY-MM+.
(here are two links in the stage:
8 (he input from the data source )EXAMPLE1+
8 (he output to the Sequential 7ile stage
(o enable the use of one of the built-in
DataStage transforms, you will assign data
elements to the D$(E columns input and output
from the (ransformer stage. $ DataStage data
element defines more precisely the kind of data
that can appear in a gi#en column. 6n this
eample, you assign the Date data element to
the input column, to specify the date is input to
the transform in internal format, and the
145(!.($B data element to the output column,
to specify that the transform produces a string of
the format YYYY-MM. Double-click the
(ransformer stage to edit it. (he (ransformer
Editor appears:
9. Working in the upper-left pane of the
(ransformer Editor, select the input columns that
you want to deri#e output columns from. 'lick on
the '4DE, D$(E, and %(" columns while holding
down the Ctrl key.
:. 'lick the left mouse button again and, keeping
it held down, drag the selected columns to the
output link in the upper-right pane. Drop the
columns o#er the 'olumn 5ame field by
releasing the mouse button. (he columns
appear in the top pane and the associated
metadata appears in the lower-right pane:
Page 64 of 243
;. 6n the Data element field for the
DS&ink;.D$(E column, select Date from the
drop-down list.
<. 6n the S: type field for the DS&ink< D$(E
column, select C(ar from the drop-down list.
=. 6n the engt( field or the DS&ink< D$(E
column, enter ;.
>. 6n the Data element field for the DS&ink<
D$(E column, select M"NT'.TA. from the
drop-down list. 5et you will specify the
transform to apply to the input D$(E column to
produce the output D$(E column. "ou do this in
the upper right pane of the (ransformer Editor.
?. Double-click the Derivation field for the
DS&ink< D$(E column. (he Epression Editor bo
appears. $t the moment, the bo contains the
tet DSLink3.DATE, which indicates that the
output is directly deri#ed from the input D$(E
column. Select the tet DSin-< and delete it by
pressing the Delete key.
Page 65 of 243
9C. Select the M"NT'.TA. transform. 6t
appears in the Epression Editor bo with the
argument field DE$rg9EF highlighted.
99. .ight-click to open the Suggest "perand
menu again. (his time, select %nput Column. $
list of a#ailable input columns appears:
9:. Select DSin-<.DAT/. (his then becomes
the argument for the transform.
Page 66 of 243
9;. 'lick "4 to sa#e the changes and eit the
(ransformer Editor. 4nce more the small icon
appears on the output link from the transformer
stage to indicate that the link now has column
definitions associated with it.
/diting t(e Se+uential File Stage
(he data warehouse is represented by a
Sequential 7ile stage. (he data to be written to
the data warehouse is already specified in the
(ransformer stage. !owe#er, you must enter the
name of a file to which the data is written when
the *ob runs. 6f the file does not eist, it is
created. Double-click the stage to edit it. (he
Se+uential File Stage dialog bo appears:
(his dialog bo has two pages:
8 Stage. Displayed by default. (his page
contains the name of the stage you are editing
and two tabs. (he .eneral tab specifies the line
termination type, and the NS tab specifies a
character set map to use with the stage )this
appears if you ha#e 5&S installed+.
8 %nputs. Describes the data flowing into the
stage. (his page only appears when you ha#e an
input to a Sequential 7ile stage. "ou do not need
to edit the column definitions on this page,
because they were all specified in the
(ransformer stage.
Page 67 of 243
To edit t(e Se+uential File stage0
9. 'lick the %nputs tab. (he %nputs page
appears. (his page contains:
8 (he name of the link. (his is automatically set
to the link name used in the *ob design.
8 .eneral tab. 'ontains the pathname of the
file, an optional description of the link, and
update action choices. "ou can use the default
settings for this eample, but you may want to
enter a file name )by default the file is named
after the input link+.
8 Format tab. Determines how the data is
written to the file. 6n this eample, the data is
written using the default settings that is, as a
comma-delimited file.
8 Columns tab. 'ontains the column definitions
for the data you want to etract. (his tab
contains the column definitions specified in the
(ransformer stageGs output link.
:. Enter the pathname of the tet file you want to
create in the File name field, for eample,
se+file.t=t. /y default the file is placed in the
ser#er pro*ect directory )for eample,
c:H$scentialHDataStageH2ro*ectsHdatastage+ and is
named after the input link, but you can enter, or
browse for, a different directory.
;. 'lick "4 to close the Se+uential File Stage
dialog bo.
<. 'hoose File Save to sa#e the *ob design.
(he *ob design is now complete and ready to be
compiled.
Compiling a !ob
When you finish your design you must compile it
to create an eecutable *ob. -obs are compiled
using the Designer. (o compile the *ob, do one of
the following:
8 'hoose File 2 Compile.
8 'lick the Compile button on the toolbar.
(he 'ompile -ob window appears:
Page 68 of 243
Running a !ob
Eecutable *obs are scheduled by the DataStage
Director and run by the DataStage Ser#er. "ou
can start the Director from the Designer by
choosing Tools 2 Run Director.
When the Director is started, the DataStage
Director window appears with the status of all
the *obs in your pro*ect:
!ighlight your *ob in the !ob name column. (o
run the *ob, choose !ob 2 Run No3 or click the
Run button on the toolbar. (he !ob Run
"ptions dialog bo appears and allows you to
specify any parameter #alues and to specify any
*ob run limits. 6n this case, *ust click Run. (he
status changes to .unning. When the *ob is
complete, the status changes to 7inished.
'hoose File 2 /=it to close the DataStage
Director window.
Page 69 of 243
Developing a Job
(he DataStage Designer is used to create and
de#elop DataStage *obs. $ DataStage *ob
populates one or more tables in the target
database. (here is no limit to the number of *obs
you can create in a DataStage pro*ect.
$ *ob design contains:
8 Stages to represent the processing steps
required
8 &inks between the stages to represent the flow
of data
(here are three different types of *ob in
DataStage:
8 Server jobs. (hese are a#ailable if you ha#e
installed Ser#er. (hey run on the DataStage
Ser#er, connecting to other data sources as
necessary.
8 Mainframe jobs. (hese are a#ailable only if
you ha#e installed Enterprise 13S Edition.
1ainframe *obs are uploaded to a mainframe,
where they are compiled and run.
8 ,arallel jobs. (hese are a#ailable only if you
ha#e installed the Enterprise Edition. (hese run
on DataStage ser#ers that are S12, 122, or
cluster systems. (here are two other entities
that are similar to *obs in the way they appear
in the DataStage Designer, and are handled by it.
(hese are:
8 S(ared containers. (hese are reusable *ob
elements. (hey typically comprise a number of
stages and links. 'opies of shared containers can
be used in any number of ser#er *obs and parallel
*obs and edited as required.
8 !ob Se+uences. $ *ob sequence allows you to
specify a sequence of DataStage ser#er or
parallel *obs to be eecuted, and actions to take
depending on results.
STA./S0
$ *ob consists of stages linked together which
describe the flow of data from a data source to a
Page 70 of 243
data target )for eample, a final data
warehouse+.
$ stage usually has at least one data input andIor
one data output. !owe#er, some stages can
accept more than one data input, and output to
more than one stage. (he different types of *ob
ha#e different stage types. (he stages that are
a#ailable in the DataStage Designer depend on
the type of *ob that is currently open in the
Designer.
Server !ob Stages
DataStage offers se#eral built-in stage types for
use in ser#er *obs. (hese are used to represent
data sources, data targets, or con#ersion stages.
(hese stages are either passi#e or acti#e stages.
$ passi#e stage handles access to databases for
the etraction or writing of data. $cti#e stages
model the flow of data and pro#ide mechanisms
for combining data streams, aggregating data,
and con#erting data from one data type to
another.
$s well as using the built-in stage types, you can
also use plug-in stages for specific operations
that the built-in stages do not support. (he
2alette organi0es stage types into different
groups, according to function:
8 Database
8 7ile
8 2lug6n
8 2rocessing
8 .eal (ime
Stages and links can be grouped in a shared
container. 6nstances of the shared container can
then be reused in different ser#er *obs. "ou can
also define a local container within a *ob, this
groups stages and links into a single unit, but can
only be used within the *ob in which it is defined.
Each stage type has a set of predefined and
editable properties. (hese properties are #iewed
or edited using stage editors.
Page 71 of 243
$t this point in your *ob de#elopment you need to
decide which stage types to use in your *ob
design. (he following built-in stage types are
a#ailable for ser#er *obs:
Page 72 of 243
Mainframe !ob Stages
Page 73 of 243
DataStage offers se#eral built-in stage types for
use in mainframe *obs. (hese are used to
represent data sources, data targets, or
con#ersion stages.
(he 2alette organi0es stage types into different
groups, according to function:
8 Database
8 7ile
8 2rocessing
Each stage type has a set of predefined and
editable properties. Some stages can be used as
data sources and some as data targets. Some
can be used as both. 2rocessing stages read
data from a source, process it andwrite it to a
data target target. (hese properties are #iewed
or edited usingstage editors. $ stage editor
eists for each stage type and $t this point in
your *ob de#elopment you need to decide which
stage types to use in your *ob design.
>
Page 74 of 243
P%r%++#+ ,o-! Pro(#!!in& St%&#!
Page 75 of 243
SERVER .O"S/
Page 76 of 243
When you design a *ob you see it in terms of
stages and links. When it is compiled, the
DataStage engine sees it in terms of processes
that are subsequently run on the ser#er. !ow
does the DataStage engine define a processJ 6t is
here that the distinction between acti#e and
passi#e stages becomes important. $cti#es
stages, such as the (ransformer and $ggregator
perform processing tasks, while passi#e stages,
such as Sequential file stage and 4D/' stage,
are reading or writing data sources and pro#ide
ser#ices to the acti#e stages. $t its simplest,
acti#e stages become processes. /ut the
situation becomes more complicated where you
connect acti#e stages together and passi#e
stages together.
Page 77 of 243
Single ,rocessor and Multi$,rocessor
Systems
(he default beha#ior when compiling DataStage
*obs is to run all ad*acent acti#e stages in a
single process. (his makes good sense when you
are running the *ob on a single processor system.
When you are running on a multi-processor
system it is better to run each acti#e stage in a
separate process so the processes can be
distributed among a#ailable processors and run
in parallel. (he enhancements to ser#er *obs at
.elease > of DataStage make it possible for you
to stipulate at design time that *obs should be
compiled in this way. (here are two ways of
doing this:
8 Eplicitly K by inserting 62' stages between
connected acti#e stages.
8 6mplicitly K by turning on inter-process row
buffering either pro*ect wide )using the
DataStage $dministrator+ or for indi#idual *obs
)in the !ob ,roperties dialog bo+
(he 62' facility can also be used to produce
multiple processes where passi#e stages are
directly connected. (his means that an operation
reading from one data source and writing to
another could be di#ided into a reading process
and a writing process able to take ad#antage of
multiprocessor systems.
Page 78 of 243
,artitioning and Collecting
Page 79 of 243
With the introduction of the enhanced multi-
processor support at .elease>, there are
opportunities to further enhance the
performance of ser#er *obs by partitioning data.
(he &ink 2artitioner stage allows you to partition
data you are reading so it can be processed by
indi#idual processors running on multiple
processors. (he &ink 'ollector stage allows you
to collect partitioned data together again for
writing to a single data target. (he following
diagram illustrates how you might use the &ink
2artitioner and &ink 'ollector stages within a *ob.
/oth stages are acti#e, and you should turn on
inter-process row buffering at pro*ect or *ob le#el
in order to implement process boundaries.
Aggregator Stages
$ggregator stages classify data rows from a
single input link into groups and compute totals
or other aggregate functions for each group. (he
summed totals for each group are output from
the stage #ia an output link.
)sing an Aggregator Stage
6f you want to aggregate the input data in a
number of different ways, you can ha#e se#eral
output links, each specifying a different set of
properties to define how the input data is
grouped and summari0ed.
When you edit an $ggregator stage, the
Aggregator Stage dialog bo appears:
Page 80 of 243
(his dialog bo has three pages:
8 Stage. Displays the name of the stage you are
editing. (his page has a .eneral tab which
contains an optional description of the stage and
names of before- and after-stage routines
8 %nputs. Specifies the column definitions for the
data input link.
8 "utputs. Specifies the column definitions for
the data output link.
Defining Aggregator %nput Data
Data to be aggregated is passed from a pre#ious
stage in the *ob design and into the $ggregator
stage #ia a single input link. (he properties of
this link and the column definitions of the data
are defined on the %nputs page in the
Aggregator Stage dialog bo.
Page 81 of 243
Note0 (he $ggregator stage does not preser#e
the order of input rows, e#en when the incoming
data is already sorted.
(he %nputs page has the following field and two
tabs:
8 %nput name. (he name of the input link to the
$ggregator stage.
8 .eneral. Displayed by default. 'ontains an
optional description of the link.
8 Columns. 'ontains a grid displaying the
column definitions for the data being written to
the stage, and an optional sort order.
Column name0 (he name of the column.
Sort "rder0 Specifies the sort order. (his
field is blank by default, that is, there is no
sort order. 'hoose Ascending for
ascending order, Descending for
descending order, or %gnore if you do not
want the order to be checked.
4ey0 6ndicates whether the column is part of
the primary key.
S: type0 (he S%& data type.
engt(0 (he data precision. (his is the length
for '!$. data and the maimum length for
3$.'!$. data.
Scale0 (he data scale factor.
Nullable0 Specifies whether the column can
contain null #alues.
Display0 (he maimum number of characters
required to display the column data.
Data element0 (he type of data in the
column.
Description0 $ tet description of the
column.
Defining Aggregator "utput Data
When you output data from an $ggregator stage,
the properties of output links and the column
definitions of the data are defined on the
"utputs page in the Aggregator Stage dialog
bo.
Page 82 of 243
(he "utputs page has the following field and
two tabs:
8 "utput name. (he name of the output link.
'hoose the link to edit from the "utput name
drop-down list bo. (his list bo displays all the
output links from the stage.
8 .eneral. Displayed by default. 'ontains an
optional description of the link.
8 Columns. 'ontains a grid displaying the
column definitions for the data being output
from the stage. (he grid has the following
columns:
Column name. (he name of the column.
.roup. Specifies whether to group by the
data in the column.
Derivation. 'ontains an epression
specifying how the data is aggregated.
(his is a comple cell, requiring more than
one piece of information. Double-clicking
the cell opens the Derivation
Transformer Stages
(ransformer stages do not etract data or write
data to a target database. (hey are used to
handle etracted data, perform any con#ersions
required, and pass data to another (ransformer
stage or a stage that writes data to a target data
table.
)sing a Transformer Stage
Page 83 of 243
(ransformer stages can ha#e any number of
inputs and outputs. (he link from the main data
input source is designated the primary input link.
(here can only be one primary input link, but
there can be any number of reference inputs.
When you edit a (ransformer stage, the
(ransformer Editor appears. $n eample
(ransformer stage is shown below. 6n this
eample, metadata has been defined for the
input and the output links.
in- Area
(he top area displays links to and from the
(ransformer stage, showing their columns and
the relationships between them. (he link area is
where all column definitions, key epressions,
and stage #ariables are defined. (he link area is
di#ided into two panesL you can drag the splitter
bar between them to resi0e the panes relati#e to
one another. (here is also a hori0ontal scroll bar,
allowing you to scroll the #iew left or right. (he
left pane shows input links, the right pane shows
output links. (he input link shown at the top of
the left pane is always the primary link. $ny
subsequent links are reference links. 7or all types
of link, key fields are shown in bold. .eference
link key fields that ha#e no epression defined
are shown in red )or the color defined in Tools
M "ptions+, as are output columns that ha#e no
deri#ation defined.
Page 84 of 243
Within the (ransformer Editor, a single link may
be selected at any one time. When selected, the
linkGs title bar is highlighted, and arrowheads
indicate any selected columns.
Metadata Area
(he bottom area shows the column metadata for
input and output links. $gain this area is di#ided
into two panes: the left showing input link
metadata and the right showing output link
metadata. (he metadata for each link is shown
in a grid contained within a tabbed page. 'lick
the tab to bring the required link to the front.
(hat link is also selected in the link area.
6f you select a link in the link area, its metadata
tab is brought to the front automatically. "ou can
edit the grids to change the column metadata on
any of the links. "ou can also add and delete
metadata.
%nput in-s
(he main data source is *oined to the
(ransformer stage #ia the primary link, but the
stage can also ha#e any number of reference
input links.
$ reference link represents a table lookup. (hese
are used to pro#ide information that might affect
the way the data is changed, but do not supply
the actual data to be changed. .eference input
columns can be designated as key fields. "ou can
specify key epressions that are used to e#aluate
the key fields. (he most common use for the
key epression is to specify an equi-*oin, which is
a link between a primary link column and a
reference link column. 7or eample, if your
primary input data contains names and
addresses, and a reference input contains names
and phone numbers, the reference link name
column is marked as a key field and the key
epression refers to the primary linkGs name
column. During processing, the name in the
primary input is looked up in the reference input.
6f the names match, the reference data is
Page 85 of 243
consolidated with the primary data. 6f the names
do not match, i.e., there is no record in the
reference input whose key matches the
epression gi#en, all the columns specified for
the reference input are set to the null #alue.
"utput in-s
"ou can ha#e any number of output links from
your (ransformer stage. "ou may want to pass
some data straight through the (ransformer
stage unaltered, but itGs likely that youGll want to
transform data from some input columns before
outputting it from the (ransformer stage. "ou
can specify such an operation by entering a
/$S6' epression or by selecting a transform to
apply to the data. DataStage has many built-in
transforms, or you can define your own custom
transforms that are stored in the .epository and
can be reused as required. (he source of an
output link column is defined in that columnGs
Derivation cell within the (ransformer Editor.
"ou can use the Epression Editor to enter
epressions or transforms in this cell. "ou can
also simply drag an input column to an output
columnGs Derivation cell, to pass the data
straight through the (ransformer stage. 6n
addition to specifying deri#ation details for
indi#idual output columns, you can also specify
constraints that operate on entire output links. $
constraint is a /$S6' epression that specifies
criteria that data must meet before it can be
passed to the output link. "ou can also specify a
re*ect link, which is an output link that carries all
the data not output on other links, that is,
columns that ha#e not met the criteria. Each
output link is processed in turn. 6f the constraint
epression e#aluates to (.UE for an input row,
the data row is output on that link. 'on#ersely, if
a constraint epression e#aluates to 7$&SE for an
input row, the data row is not output on that link.
'onstraint epressions on different links are
independent. 6f you ha#e more than one output
link, an input row may result in a data row being
output from some, none, or all of the output
links. 7or eample, if you consider the data that
Page 86 of 243
comes from a paint shop, it could include
information about any number of different colors.
6f you want to separate the colors into different
files, you would set up different constraints. "ou
could output the information about green and
blue paint on &ink $, red and yellow paint on &ink
/, and black paint on &ink '. When an input
row contains information about yellow paint, the
&ink $ constraint epression e#aluates to 7$&SE
and the row is not output on &ink $. !owe#er,
the input data does satisfy the constraint
criterion for &ink / and the rows are output on
&ink /. 6f the input data contains information
about white paint, this does not satisfy any
constraint and the data row is not output on
&inks $, / or ', but will be output on the re*ect
link. (he re*ect link is used to route data to a
table or file that is a Ncatch-allO for rows that are
not output on any other link. (he table or file
containing these re*ects is represented by
another stage in the *ob design.
Inter-Process Stages
$n inter-process )62'+ stage is a passi#e stage
which pro#ides a communication channel
between DataStage processes running
simultaneously in the same *ob. 6t allows you to
design *obs that run on S12 systems with great
performance benefits. (o understand the
benefits of using 62' stages, you need to know a
bit about how DataStage *obs actually run as
processes,
6n this eample the *ob will run as two processes,
one handling the communication from sequential
file stage to 62' stage, and one handling
Page 87 of 243
communication from 62' stage to 4D/' stage. $s
soon as the Sequential 7ile stage has opened its
output link, the 62' stage can start passing data
to the 4D/' stage. 6f the *ob is running on a
multi-processor system, the two processor can
run simultaneously so the transfer will be much
faster. "ou can also use the 62' stage to
eplicitly specify that connected acti#e stages
should run as separate processes. (his is
ad#antageous for performance on multi-
processor systems. "ou can also specify this
beha#ior implicitly by turning inter process row
buffering on, either for the whole pro*ect #ia
DataStage $dministrator, or indi#idually for a *ob
in its !ob ,roperties dialog bo.
)sing t(e %,C Stage
When you edit an 62' stage, the %nter,rocess
Stage dialog bo appears.
Page 88 of 243
(his dialog bo has three pages:
8 Stage. (he Stage page has two tabs, .eneral
and ,roperties. (he .eneral page allows you
to specify an optional description of the page.
(he ,roperties tab allows you to specify stage
properties.
8 %nputs. (he 62' stage can only ha#e one input
link. the %nputs page displays information about
that link.
8 "utputs. (he 62' stage can only ha#e one
output link. (he "utputs page displays
information about that link.
Defining %,C Stage ,roperties
(he ,roperties tab allows you to specify two
properties for the 62' stage:
8 #uffer Si?e. Defaults to 9:@ Pb. (he 62' stage
uses two blocks of memoryL one block can be
written to while the other is read from. (his
property defines the si0e of each block, so that
by default :=> Pb is allocated in total.
8 Timeout. Defaults to 9C seconds. (his gi#es
time limit for how long the stage will wait for a
process to connect to it before timing out. (his
normally will not need changing, but may be
important where you are prototyping multi-
processor *obs on single processor platforms and
there are likely to be delays.
Defining %,C Stage %nput Data
Page 89 of 243
(he 62' stage can ha#e one input link. (his is
where the process that is writing connects.
(he 6nputs page has two tabs: .eneral and
Columns.
8 .eneral. (he .eneral tab allows you to
specify an optional description of the stage.
8 Columns. (he Columns tab contains the
column definitions for the data on the input link.
(his is normally populated by the metadata of
the stage connecting on the input side. "ou can
also oad a column definition from the
.epository, or type one in yourself )and Save it
to the .epository if required+. 5ote that the
metadata on the input link must be identical to
the metadata on the output link.
Defining %,C Stage "utput Data
(he 62' stage can ha#e one output link. (his is
where the process that is reading connects.
(he "utputs page has two tabs: .eneral and
Columns.
8 .eneral. (he .eneral tab allows you to
specify an optional description of the stage.
8 Columns. (he Columns tab contains the
column definitions for the data on the input link.
(his is normally populated by the metadata of
the stage connecting on the input side. "ou can
also oad a column definition from the
.epository, or type one in yourself )and Save it
to the .epository if required+. 5ote that the
metadata on the output link must be identical to
the metadata on the input link.
Lin P%rtition#r St%&#/
(he &ink 2artitioner stage is an acti#e stage
which takes one input and allows you to
distribute partitioned rows to up to >< output
links. (he stage epects the output links to use
the same metadata as the input link. 2artitioning
your data enables you to take ad#antage of a
multi-processor system and ha#e the data
processed in parallel. 6t can be used in
Page 90 of 243
con*unction with the &ink 'ollector stage to
partition data, process it in parallel, and then
collect it together again before writing it to a
single target.
6n order for this *ob to compile and run as
intended on a multi-processor system you must
ha#e inter-process buffering turned on, either at
pro*ect le#el using the DataStage $dministrator,
or at *ob le#el from the !ob ,roperties dialog
bo.
Defining in- ,artitioner Stage ,roperties
(he ,roperties tab allows you to specify two
properties for the &ink 2artitioner stage:
8 ,artitioning Algorit(m. Use this property to
specify the method the stage uses to partition
data. 'hoose from:
& Round$Robin. (his is the default method.
Using the round-robin method the stage will write
each incoming row to one of its output links in
turn.
& Random. Using this method the stage will use
a random number generator to distribute
incoming rows e#enly across all output links.
& 'as(. Using this method the stage applies a
hash function to one or more input column
#alues to determine which output link the row is
passed to.
& Modulus. Using this method the stage applies
a modulus function to an integer input column
#alue to determine which output link the row is
passed to.
Page 91 of 243
8 ,artitioning 4ey. (his property is only
significant where you ha#e chosen a partitioning
algorithm of !ash or 1odulus. 7or the !ash
algorithm, specify one or more column names
separated by commas. (hese keys are
concatenated and a hash function applied to
determine the destination output link. 7or the
1odulus algorithm, specify a single column name
which identifies an integer numeric column. (he
#alue of this column #alue determines the
destination output link.
Link Collector Stages
(he &ink 'ollector stage is an acti#e stage which
takes up to >< inputs and allows you to collect
data from this links and route it along a single
output link. (he stage epects the output link to
use the same metadata as the input links. (he
&ink 'ollector stage can be used in con*unction
with a &ink 2artitioner stage to enable you to
take ad#antage of a multi-processor system and
ha#e data processed in parallel. (he &ink
2artitioner stage partitions data, it is processed
in parallel, then the &ink 'ollector stage collects
it together again before writing it to a single
target.
(he following diagram illustrates how the &ink
'ollector stage can be used in a *ob in this way.
6n order for this *ob to compile and run as
intended on a multi-processor system you must
Page 92 of 243
ha#e inter-process buffering turned on, either at
pro*ect le#el using the Data Stage $dministrator,
or at *ob le#el from the !ob ,roperties dialog
bo.
Defining in- Collector Stage ,roperties
(he ,roperties tab allows you to specify two
properties for the &ink 'ollector stage:
8 Collection Algorit(m. Use this property to
specify the method the stage uses to collect
data. 'hoose from:
& Round$Robin. (his is the default method.
Using the round-robin method the stage will read
a row from each input link in turn.
& Sort@Merge. Using the sortImerge method the
stage reads multiple sorted inputs and writes one
sorted output.
8 Sort 4ey. (his property is only significant
where you ha#e chosen a collecting algorithm of
SortI1erge. 6t defines how each of the partitioned
data sets are known to be sorted and how the
merged output will be sorted. (he key has the
following format: Column name Qsort orderF
D,Column name Dsort orderFF...
INFOR0ATI1A 2! DATASTAGE/
F#%tur#! Inform%ti(% D%t%St%&#
S)!t#m R#3uir#m#nt
- Platform Support Win NT/UNIX Win NT/UNIX/More Platforms
D#p+o)m#nt F%(i+it)
- Ability to handle initial
deployment, maor releases,
minor releases and pat!hes
"ith e#ual ease
$es,
My e%perien!e has been
that IN&A is definitely
easier to implement
initially and up'rade(
No,
As!ential has done a 'ood ob
in re!ent releases(
Tr%n!form%tion!
Page 93 of 243
- No of a)ailable
transformation fun!tions
*+ ,+,
-S has many more !anned
transformation fun!tions than
,+(
- Support for loopin' the
sour!e ro" .&or While /oop0
Supports for !omparin'
immediate pre)ious
re!ord
-oes not support
- Slo"ly 1han'in' -imension &ull history, re!ent
)alues, 1urrent 2 Pre)
)alues
Supports only throu'h 1ustom
s!ripts( -oes not ha)e a
"i3ard to do this(
-S has a !omponent !alled
ProfileSta'e that handles this
type of !omparison( $ou4ll "ant
to use it udi!iously in your
produ!tion pro!essin' be!ause
it does ta5e e%tra resour!es to
use it but I ha)e
found it to be )ery useful(
- Time -imension 'eneration -oes not support( -oes not support(
- 6ee!ted 6e!ords 1an be !aptured 1annot be !aptured in
separate file(
-S absolutely has the ability to
!apture ree!ted re!ords in a
separate file( That4s a pretty
basi! !apability and I don4t
5no" of any 7T/ tool
that !an4t do it(((
- -ebu''in' &a!ility Not Supported( Supports basi! debu''in'
fa!ilities for testin'(
App+i(%tion Int#&r%tion
Fun(tion%+it)
- Support for real Time
-ata 7%!han'e
Not A)ailable Not A)ailable,
The 8(% )ersion of -S has a
!omponent to handle real-time
data e%!han'e( I thin5 it is
!alled 6T7(
- Support for 196:A/XM/ -oes not support -oes not support
0#t%'%t%
- Ability to )ie" 2 na)i'ate
metadata on the "eb
-oes Not Support ;ob sessions !an be monitored
usin' Informati!a
1lasses(
This is !ompletely not true( -S
has a )ery stron' metadata
!omponent .MetaSta'e0 that
"or5s not only "ith -S, but
also has plu'-ins to "or5
"ith modelin' tools .li5e
76Win0 and :I tools .li5e
1o'nos0( This is one
of their stron' suits .a'ain,
IM<90(
- Ability to 1ustomi3e )ie"s of
metadata for different users
.-:A =s
Supports Not A)ailable,
Also not true - MetaSta'e
allo"s publishin' of metadata
Page 94 of 243
:usiness user0( in <TM/ format for different
types of users( It is !ompletely
!ustomi3able(
- Metadata repository !an be
stored in 6-:MS
$es No( :ut the proprietary meta
data !an be mo)ed to a
6-:MS usin' the -91 Tool
Support An' 0%int#n%n(#
- 1ommand line operation Pm!md -ser)er interfa!e
for !ommand line
Not A)ailable
- Ability to maintain )ersions
of mappin's
$es No,
Not true - this has been a "ea5
spot for -S in past releases,
but the8(% )ersion of -S has a
'ood )ersionin' tool(
.o- 1ontro++in& 4 S(*#'u+in&
- Alerts li5e sendin' mails Supported -oes not support dire!tly .no
option0( :ut possible
to !all !ustom pro'rams after
the ob 'et e%e!uted0
>0 System 6e#uirement
>(> Platform Support
>(>(> Informati!a? Win NT/ Uni%
>(>(, -ataSta'e? Win NT/ Uni%/More platforms(
,0 -eployment fa!ility
,(>( Ability to handle initial deployment, maor releases, minor
releases and pat!hes "ith e#ual ease
,(>(>(Informati!a?( $es
,(>(,(-ataSta'e? No
My e%perien!e has been that IN&A is definitiely easier to
implementinitially and up'rade( As!ential has done a 'ood ob in
re!ent releases
to impro)e, but IM<9 IN&A still does this better(
@0 Transformations
@(>( No of a)ailable transformation fun!tions
@(>(>(Informati!a?( *+
@(>(,(-ataSta'e? ,+
-S has many more !anned transformation fun!tions than ,+( I4m
not sure"hat leads you to this number, but I4d re!he!5 it if I "ere
you(
@(,( Support for loopin' the sour!e ro" .&or While /oop0
@(,(>(Informati!a?( Supports for !omparin' immediate pre)ious
re!ord
@(,(,(-ataSta'e? -oes not support
@(@( Slo"ly 1han'in' -imension
@(@(>(Informati!a?( Supports &ull history, re!ent )alues, 1urrent 2
Pre) )alues(
@(@(,(-ataSta'e? Supports only throu'h 1ustom s!ripts( -oes not
Page 95 of 243
ha)e a
"i3ard to do this
-S has a !omponent !alled ProfileSta'e that handles this type
of!omparison( $ou4ll "ant to use it udis!iously in your produ!tion
pro!essin' be!ause it does ta5e e%tra resour!es to use it but I ha)e
found it to be )ery useful(
@(A( Time -imension 'eneration
@(A(>(Informati!a?( -oes not support(
@(A(,(-ataSta'e? -oes not support
@(*( 6ee!ted 6e!ords
@(*(>(Informati!a?( 1an be !aptured
@(*(,(-ataSta'e? 1annot be !aptured in separate file
-S absolutely has the ability to !apture ree!ted re!ords in a
separatefile( That4s a pretty basi! !apability and I don4t 5no" of any
7T/ tool
that !an4t do it(((
@(*( -ebu''in' &a!ility
@(*(>(Informati!a?( Not Supported
@(*(,(-ataSta'e? Supports basi! debu''in' fa!ilities for testin'(
A0 Appli!ation Inte'ration &un!tionality
A(>( Support for real Time
-ata 7%!han'e
A(>(>((Informati!a?( Not A)ailable
A(>(,(-ataSta'e? Not A)ailable(
The 8(% )ersion of -S has a !omponent to handle real-time
datae%!han'e( I ha)e not personnaly used it yet, but you should
loo5 into
it( I thin5 it is !alled 6T7(
A(,( Support for 196:A/XM/
A(>(>((Informati!a?( -oes not support
A(>(,(-ataSta'e? -oes not support
*0 Metadata
*(>( Ability to )ie" 2 na)i'ate metadata on the "eb
*(>(>((Informati!a?( -oes not support
*(>(,(-ataSta'e? ;ob sessions !an be monitored usin' Informati!a
1lasses
This is !ompletely not true( -S has a )ery stron' metadata
!omponent.MetaSta'e0 that "or5s not only "ith -S, but also has
plu'-ins to "or5
"ith modelin' tools .li5e 76Win0 and :I tools .li5e 1o'nos0( This is
one
of their stron' suits .a'ain, IM<90(
*(>( Ability to 1ustomi3e )ie"s of metadata for different users .-:A
=s
:usiness user0
*(>(>((Informati!a?( Supports(
*(>(,(-ataSta'e? Not A)ailable
Also not true - MetaSta'e allo"s publishin' of metadata in <TM/
Page 96 of 243
format for different types of users( It is !ompletely !ustomi3able(
*(>( Metadata repository !an be stored in 6-:MS
*(>(>((Informati!a?( $es
*(>(,(-ataSta'e? No( :ut the proprietary meta data !an be mo)ed
to a
6-:MS usin' the -91 Tool
B0 Support And Maintenan!e
B(>( 1ommand line operation
B(>(>((Informati!a?( Pm!md -ser)er interfa!e for !ommand line
B(>(,(-ataSta'e? Not A)ailable
B(,( Ability to maintain )ersions of mappin's
B(>(>((Informati!a?( $es
B(>(,(-ataSta'e? No
Not true - this has been a "ea5 spot for -S in past releases, but
the8(% )ersion of -S has a 'ood )ersionin' tool(
80 ;ob 1ontrollin' 2 S!hedulin'
8(>( Alerts li5e sendin' mails
8(>(>((Informati!a?( Supported(
8(>(,(-ataSta'e? -oes not support dire!tly . no option0( :ut
possible
to !all !ustom pro'rams after the ob 'et e%e!uted0
&urther mista5es in your !omparison, mainly from a -ataSta'e
based an'le as my e%perien!e is "ith that produ!t?
:oth -ataSta'e and Informati!a support XM/( -ataSta'e
!omes "ith XM/ input, transformation and output sta'es(
:oth produ!ts ha)e an unlimited number of transformation
fun!tions sin!e you !an easily "rite your o"n usin' the
!ommand interfa!e(
:oth produ!ts ha)e options for inte'ratin' "ith 76P
systems su!h as SAP, PeopleSoft and Seibel but these
!ome at a si'nifi!ant e%tra !ost( $ou may need to e)aluate
these( SAP is a reseller of -ataSta'e for SAP :W,
PeopleSoft bundles -ataSta'e in its 7PM produ!ts(
-ataSta'e has some )ery 'ood debu''in' fa!ilities
in!ludin' the ability to step throu'h a ob lin5 by lin5 or ro"
by ro" and "at!h data )alues as a ob e%e!utes( Also
ser)er side tra!in'(
-ataSta'e 8(% releases ha)e intelli'ent assistants
."i3ards0 for !reatin' the template obs for ea!h type of
slo"ly !han'in' dimension table loads( The -ataSta'e
:est Pra!ti!es !ourse also pro)ides trainin' in -W loadin'
"ith S1- and surro'ate 5ey te!hni#ues(
As!ential and Informati!a both ha)e robust metadata
mana'ement produ!ts( As!ential MetaSta'e !omes
bundled free "ith -ataSta'e 7nterprise and mana'es
metadata )ia a hub and spo5e ar!hite!ture( It !an import
metadata from a "ide ran'e of databases and modellin'
tools and has a hi'h de'ree of intera!tion "ith -ataSta'e
Page 97 of 243
for operational metadata( Informati!a SuperClue "as
released last year and is rated more hi'hly by Cartner in
the metadata field( It inte'rates !losely "ith Po"er1enter
produ!ts( They both support multiple )ie"s .business and
te!hni!al0 of metadata plus the fun!tions you "ould e%pe!t
su!h as impa!t analysis, semanti!s and data linea'e(
-ataSta'e !an send emails( The se#uen!e ob has an
email sta'e that is easy to !onfi'ure( -ataSta'e 8(* also
has ne" mobile de)i!e support so you !an administer your
-ataSta'e obs )ia a palm pilot( There are also @rd party
"eb based tools that let you run and re)ie" obs o)er a
bro"ser( I found it easy to send sms admin messa'es
from a -ataSta'e Uni% ser)er(
-ataSta'e has a !ommand line interfa!e( The dsob
!ommand !an be used by any s!hedulin' tool or from the
!ommand line to run obs and !he!5 the results and lo's of
obs(
:oth produ!ts inte'rate "ell "ith Trillium for data #uality,
-ataSta'e also inte'rate "ith DualitySta'e for data #uality(
This is the preferred method of address !leansin' and
fu33y mat!hin'(
Milind - I4)e 'ot to as5 - "here are you 'ettin' your information
fromEEE I ha)e done 7T/ tool !omparisons for se)eral !lients o)er
the past 8 or so years( They are both 'ood tools "ith different
stren'ths so it really depends on "hat your or'ani3ations needs /
priorities are as to "hi!h one is FbetterF( I ha)e spent mu!h more
time in the past !ouple of years on -S than IN&A so I don4t feel I
!an spea5 to the !han'es IN&A has made lately, but I 5no" you
ha)e in!orre!t info about -S(
I am !urrently "or5in' "ith a !lient on -S )8(>( I4)e made a fe"
!omments belo" for the more 'larin' ina!!ura!ies or topi!s "here I
ha)e up-to-date e%perien!e( I su''est you re-resear!h and perhaps
do a proof-of-!on!ept "ith ea!h )endor(
&$I - I don4t 5no" if you ha)e loo5ed at the Parallel 7%tender
!omponent of -S 8(%, but it is a terrifi! !apability if you ha)e
!hallen'es "ith meetin' a)ailability re#uirements( It is one of the
most impressi)e !han'es As!ential has made lately .IM<90(
G$r#*&r 7$, 0&*/or r&+or#, o* A,-&*#)$( $*/ I*form$#)-$.
T7&1 $(,o 7$0& $ m$%)- 9"$/r$*# #7$# (),#, !o#7 D$#$S#$%&
$*/ I*form$#)-$ $, #7& -(&$r m$r;&# (&$/&r,. I /o*Q# #7)*; 1o"
-$* %o Cro*% C)#7 &)#7&r +ro/"-#D )# -om&, /oC* #o C7&#7&r
1o" -$* $--&,, &?+&r#, )* #7&,& +ro/"-#, for 1o"r +ro2&-# $*/
C7$# o+#)o*, 1o" 7$0& for #r$)*)*%. I #7)*; )f 1o" %o )*#o $
m$2or +ro2&-# C)#7 &)#7&r +ro/"-# $*/ 1o" /o*Q# 7$0& $* &?+&r#
o* 1o"r #&$m )# -$* %o !$/(1 Cro*%.
F"r#7&r m),#$;&, )* 1o"r -om+$r),o*D m$)*(1 from $
D$#$S#$%& !$,&/ $*%(& $, m1 &?+&r)&*-& ), C)#7 #7$# +ro/"-#=
Page 98 of 243
- 4o#7 D$#$S#$%& $*/ I*form$#)-$ ,"++or# H..
D$#$S#$%& -om&, C)#7 H. )*+"#D #r$*,form$#)o*
$*/ o"#+"# ,#$%&,.
- 4o#7 +ro/"-#, 7$0& $* "*()m)#&/ *"m!&r of
#r$*,form$#)o* f"*-#)o*, ,)*-& 1o" -$* &$,)(1 Cr)#&
1o"r oC* ",)*% #7& -omm$*/ )*#&rf$-&.
- 4o#7 +ro/"-#, 7$0& o+#)o*, for )*#&%r$#)*% C)#7 ERP
,1,#&m, ,"-7 $, SAPD P&o+(&Sof# $*/ S&)!&( !"# #7&,&
-om& $# $ ,)%*)f)-$*# &?#r$ -o,#. >o" m$1 *&&/ #o
&0$("$#& #7&,&. SAP ), $ r&,&((&r of D$#$S#$%& for SAP
4WD P&o+(&Sof# !"*/(&, D$#$S#$%& )* )#, EP.
+ro/"-#,.
- D$#$S#$%& 7$, ,om& 0&r1 %oo/ /&!"%%)*% f$-)()#)&,
)*-("/)*% #7& $!)()#1 #o ,#&+ #7ro"%7 $ 2o! ()*; !1 ()*;
or roC !1 roC $*/ C$#-7 /$#$ 0$("&, $, $ 2o! &?&-"#&,.
A(,o ,&r0&r ,)/& #r$-)*%.
- D$#$S#$%& 8.? r&(&$,&, 7$0& )*#&(()%&*# $,,),#$*#,
IC)E$r/,B for -r&$#)*% #7& #&m+($#& 2o!, for &$-7 #1+&
of ,(oC(1 -7$*%)*% /)m&*,)o* #$!(& (o$/,. T7&
D$#$S#$%& 4&,# Pr$-#)-&, -o"r,& $(,o +ro0)/&, #r$)*)*%
)* DW (o$/)*% C)#7 S'D $*/ ,"rro%$#& ;&1
#&-7*)9"&,.
- A,-&*#)$( $*/ I*form$#)-$ !o#7 7$0& ro!",# m&#$/$#$
m$*$%&m&*# +ro/"-#,. A,-&*#)$( .&#$S#$%& -om&,
!"*/(&/ fr&& C)#7 D$#$S#$%& E*#&r+r),& $*/ m$*$%&,
m&#$/$#$ 0)$ $ 7"! $*/ ,+o;& $r-7)#&-#"r&. I# -$*
)m+or# m&#$/$#$ from $ C)/& r$*%& of /$#$!$,&, $*/
mo/&(()*% #oo(, $*/ 7$, $ 7)%7 /&%r&& of )*#&r$-#)o*
C)#7 D$#$S#$%& for o+&r$#)o*$( m&#$/$#$. I*form$#)-$
S"+&rG("& C$, r&(&$,&/ ($,# 1&$r $*/ ), r$#&/ mor&
7)%7(1 !1 G$r#*&r )* #7& m&#$/$#$ f)&(/. I# )*#&%r$#&,
-(o,&(1 C)#7 PoC&r'&*#&r +ro/"-#,. T7&1 !o#7
,"++or# m"(#)+(& 0)&C, I!",)*&,, $*/ #&-7*)-$(B of
m&#$/$#$ +(", #7& f"*-#)o*, 1o" Co"(/ &?+&-# ,"-7 $,
)m+$-# $*$(1,),D ,&m$*#)-, $*/ /$#$ ()*&$%&.
- D$#$S#$%& -$* ,&*/ &m$)(,. T7& ,&9"&*-& 2o! 7$, $*
&m$)( ,#$%& #7$# ), &$,1 #o -o*f)%"r&. D$#$S#$%& 8.5
$(,o 7$, *&C mo!)(& /&0)-& ,"++or# ,o 1o" -$*
$/m)*),#&r 1o"r D$#$S#$%& 2o!, 0)$ $ +$(m +)(o#.
T7&r& $r& $(,o 3r/ +$r#1 C&! !$,&/ #oo(, #7$# (&# 1o"
r"* $*/ r&0)&C 2o!, o0&r $ !roC,&r. I fo"*/ )# &$,1 #o
,&*/ ,m, $/m)* m&,,$%&, from $ D$#$S#$%& U*)?
,&r0&r.
- D$#$S#$%& 7$, $ -omm$*/ ()*& )*#&rf$-&. T7& /,2o!
-omm$*/ -$* !& ",&/ !1 $*1 ,-7&/"()*% #oo( or from
#7& -omm$*/ ()*& #o r"* 2o!, $*/ -7&-; #7& r&,"(#,
$*/ (o%, of 2o!,.
Page 99 of 243
- 4o#7 +ro/"-#, )*#&%r$#& C&(( C)#7 Tr)(()"m for /$#$
9"$()#1D D$#$S#$%& $(,o )*#&%r$#& C)#7 Q"$()#1S#$%& for
/$#$ 9"$()#1. T7), ), #7& +r&f&rr&/ m&#7o/ of $//r&,,
-(&$*,)*% $*/ f"EE1 m$#-7)*%.
How Should We Implement A Slowly Changing
Dimension?
'"rr&*#(1D o"r /$#$ C$r&7o",& 7$, o*(1 T1+& 1 S(oC(1
'7$*%)*% D)m&*,)o*, IS'DB. T7$# ), #o ,$1 C& o0&rCr)#& #7&
/)m&*,)o* r&-or/ C)#7 &0&r1 "+/$#&. T7& +ro!(&m C)#7 #7$# ),
C7&* /$#$ -7$*%&,D )# -7$*%&, for $(( 7),#or1 C7)(& #7), ),
0$()/ for /$#$ &*#r1 -orr&-#)o*,D )# m$1 *o# !& 0$()/ for $((
/$#$. A* $--&+#$!(& &?$m+(& -o"(/ !& '",#om&r D$#& of
4)r#7. If #7& /$#& of !)r#7 C$, -7$*%&/D -7$*-&, $r& #7& r&$,o*
C$, #7$# #7&)r /$#$ C$, )*-orr&-#.
HoC&0&rD )f #7& '",#om&r $//r&,, C&r& -7$*%&/D #7), m$1
$*/ +ro!$!(1 /o&, m&$* #7& -",#om&r mo0&/. If C& ,)m+(1
o0&rCr)#& #7& $//r&,, #7&* $(( ,$(&, for #7$# -",#om&r C)((
!&(o*% #o #7& *&C $//r&,,. S"++o,& #7& -",#om&r mo0&/
from F(or)/$ #o O7)o. If C& C&r& #r1)*% #o #r$-; ,$(&, +$##&r*,
!1 r&%)o*D $(( of #7& -",#om&rG, +"r-7$,& #7$# C&r& m$/& )*
F(or)/$ Co"(/ *oC $++&$r #o 7$0& !&&* m$/& )* O7)o.
Type 1 lo)ly *han%in% Dimension
Customer Dimension
CODE
ID '",#K&1 N$m& DO4 ')#1 S#$#&
1001 4S001 4o! Sm)#7 6J:J1<61 T$m+$ F
1002 3004 ),$ 3o*&, 10J15J1<54 .)$m) F
Customer Dimension After Edits
CODE
ID '",#K&1 N$m& DO4 ')#1 S#$#&
1001 4S001 4o! Sm)#7 6J:J1<61 D$1#o* OH
1002 3004 ),$ 3o*&, 10J15J1<54 .)$m) F
I* #7& &?$m+(& $!o0&D #7& DO4 -7$*%& /o&,*G# $ff&-# $*1
/)m&*,)o*$( r&+or#)*% f$-#,. HoC&0&rD #7& ')#1D S#$#& -7$*%&
Co"(/ 7$0& $* $ff&-#. NoC $(( ,$(&, for 4o! Sm)#7 Co"(/
$++&$r #o -om& from D$1#o*D O7)o r$#7&r #7$* from T$m+$D
F(or)/$.
T7& ,o("#)o* C& 7$0& -7o,&* for ,o(0)*% #7), +ro!(&m ), #o
Page 100 of 243
)m+(&m&*# $ T1+& 2 ,(oC(1 -7$*%)*% /)m&*,)o*. A T1+& 2
S'D r&-or/, $ ,&+$r$#& roC &$-7 #)m& $ 0$("& ), -7$*%&/ )*
#7& /)m&*,)o*. I* o"r -$,&D C& $r& /&-($r)*% #7$# C& C)(( o*(1
-r&$#& $ *&C /)m&*,)o* r&-or/ C7&* -&r#$)* -o("m*, $r&
-7$*%&/. I* #7& &?$m+(& $!o0&D C& Co"(/ *o# r&-or/ $ *&C
r&-or/ for #7& DO4 -7$*%& !"# C& Co"(/ for #7& $//r&,,
-7$*%&.
Type 2 lo)ly *han%in% Dimension
Customer Dimension
CODE
ID '",#K&1 N$m& DO4 ')#1 S# '"rr
Eff&-#)0& D$#&
1001 4S001 4o! Sm)#7 6J:J1<61 T$m+$ F
> 5J1J2004
1002 3004 ),$ 3o*&, 10J15J1<54 .)$m) F
> 5J2J2004
Customer Dimension After Edits
CODE
ID '",#K&1 N$m& DO4 ')#1 S# '"rr
Eff&-#)0& D$#&
1001 4S001 4o! Sm)#7 6J:J1<61 T$m+$ F N
5J1J2004
1002 3004 ),$ 3o*&, 10J15J1<54 .)$m) F >
5J2J2004
1003 4S001 4o! Sm)#7 6J:J1<61 D$1#o* OH >
5J28J2004
A, 1o" -$* ,&&D #7&r& $r& #Co /)m&*,)o* r&-or/, for 4o!
Sm)#7 *oC. T7&1 !o#7 7$0& #7& ,$m& '",#K&1 0$("&,D !"# #7&
7$0& /)ff&r&*# ID 0$("&,. A(( f"#"r& f$-# #$!(& roC, C)(( ",&
#7& *&C ID #o ()*; #o #7& '",#om&r /)m&*,)o*. T7), ),
$--om+(),7&/ !1 #7& ",& of #7& '"rr&*# F($%. T7& ET
+ro-&,, (oo;, o*(1 $# #7& -"rr&*# f($% C7&* r&-or/)*% *&C
or/&r,. HoC&0&rD )* #7& -$,& of $* "+/$#& #o $* or/&r #7&
Eff&-#)0& D$#& m",# !& ",&/ #o /&#&rm)*& C7)-7 -",#om&r #7&
"+/$#& $++()&, #o.
T7& +r)m$r1 ),,"& C)#7 T1+& 2 S'D ), #7& 0o("m& of /$#$
%roC, &?+o*&*#)$((1 $, mor& -7$*%&, $r& #r$-;&/. T7), -$*
)m+$-# +&rform$*-& )* $ ,#$r ,-7&m$. T7& +r)*-)+(& !&7)*/
#7& ,#$r ,-7&m$ /&,)%* ), #7$# C7)(& f$-#, $r& f&C -o("m*,D
#7&1 7$0& m$*1 roC, !"# #7&1 o*(1 7$0& #o +&rform ,)*%(&
(&0&( 2o)*, #o r&,o(0& #7&)r /)m&*,)o*,. T7& $,,"m+#)o* ), #7$#
Page 101 of 243
#7& /)m&*,)o*, 7$0& (o#, of -o("m*, !"# r&($#)0&(1 f&C
roC,. T7), $((oC, for 0&r1 f$,# 2o)*)*% of /$#$.
Conforming Dimensions
For #7& +"r+o,&, of #7), /),-",,)o* -o*form)*% /)m&*,)o*,
o*(1 *&&/ $ !r)&f /&f)*)#)o*. 'o*form)*% /)m&*,)o*, $r& $
f&$#"r& of ,#$r ,-7&m$, #7$# $((oC f$-#, #o ,7$r& /)m&*,)o*$(
/$#$. A -o*form)*% /)m&*,)o* o--"r, C7&* #Co /)m&*,)o*,
,7$r& #7& ,$m& ;&1,. Of#&* #7&1 7$0& /)ff&r&*#
$##r)!"#&,. T7& %o$( ), #o &*,"r& #7$# $*1 f$-# #$!(& -$* ()*; #o
#7& -o*form)*% /)m&*,)o* $*/ -o*,"m& )#, /$#$ ,o (o*% $, #7&
/)m&*,)o* ), r&(&0$*#.
*onformin% Dimension
Customer Dimension
CODE
ID '",#K&1 N$m& DO4 ')#1 S#$#&
1001 4S001 4o! Sm)#7 6J:J1<61 T$m+$ F
1002 3004 ),$ 3o*&, 10J15J1<54 .)$m) F
Billing Dimension
CODE
ID 4)((2K1 N$m& A--o"*# T1+& 'r&/)#
)m)# '",#K&1
1001 <211 4o! Sm)#7 'r&/)# ^10D000
4S001
1002 23421 ),$ 3o*&, '$,7 ^100
3004
I* #7& &?$m+(& $!o0&D C& -o"(/ ",& #7& ID from #7& '",#om&r
/)m&*,)o* )* $ f$-# $*/ )* #7& f"#"r& $ ()*; #o #7& 4)(()*%
/)m&*,)o* -o"(/ !& &,#$!(),7&/ C)#7o"# 7$0)*% #o r&(o$/ #7&
/$#$.
W& $r& -o*,)/&r)*% $ ,()%7# mo/)f)-$#)o* #o #7& ,#$*/$r/ T1+&
2 S'D. T7& )/&$ ), #o m$)*#$)* #Co /)m&*,)o*, o*& $, $ T1+&
1 $*/ o*& $, $ T1+& 2. T7& +ro!(&m C)#7 #7), ), C& (o,& #7&
$!)()#1 #o ",& -o*form)*% /)m&*,)o*,.
Type 2 an# Type 1 lo)ly *han%in% Dimension
Customer Dimension Type 1
Page 102 of 243
CODE
ID '",#K&1 N$m& DO4 ')#1 S# '"rr
Eff&-#)0& D$#&
1001 4S001 4o! Sm)#7 6J:J1<61 D$1#o* OH
> 5J1J2004
1002 3004 ),$ 3o*&, 10J15J1<58 .)$m) F
> 5J2J2004
Customer Dimension Type 2
CODE
ID '",#K&1 N$m& DO4 ')#1 S# '"rr
Eff&-#)0& D$#&
1001 4S001 4o! Sm)#7 6J:J1<61 T$m+$ F
N 5J1J2004
1002 3004 ),$ 3o*&, 10J15J1<58 .)$m) F
> 5J2J2004
1003 4S001 4o! Sm)#7 6J:J1<61 D$1#o* OH
> 5J28J2004
A, 1o" -$* ,&&D #7& -"rr&*# ID for 4o! Sm)#7 )* #7& T1+& 1
S'D ), 1001D C7)(& )# ), 1003 )* #7& T1+& 2 S'D. T7), ), *o#
-o*form)*%.
O"r ,o("#)o* ), #o -r&$#& $ -om+o,)#& ;&1 for #7& T1+& 2 S'D.
Type 2 an# Type 1 lo)ly *han%in% Dimension
Customer Dimension Type 1
CODE
ID '",#K&1 N$m& DO4 ')#1 S#
1001 4S001 4o! Sm)#7 6J:J1<61 D$1#o* OH
1002 3004 ),$ 3o*&, 10J15J1<58 .)$m) F
Customer Dimension Type 2
CODE
ID S"!K&1 '",#K&1 N$m& DO4 ')#1
S# '"rr Eff D$#&
1001 001 4S001 4o! Sm)#7 6J:J1<61 T$m+$
F N 5J1J2004
1002 001 3004 ),$ 3o*&, 10J15J1<58 .)$m)
F > 5J2J2004
1001 002 4S001 4o! Sm)#7 6J:J1<61
D$1#o* OH > 5J28J2004
Page 103 of 243
I* #7& &?$m+(& $!o0&D #7& T1+& 1 $*/ #7& T1+& 2 /)m&*,)o*,
-o*form o* #7& ID (&0&(. If $ f$-# *&&/, #7& 7),#or)-$( /$#$ )#
C)(( -o*,"m& !o#7 #7& ID $*/ #7& S"!K&1.
"EFORE 5OU DESIGN 5OUR
APPLI1ATION
Yo" m",# $,,&,, 1o"r /$#$. D$#$ S#$%& 2o!, -$* !& 9")#&
-om+(&? $*/ ,o )# ), $/0),$!(& #o -o*,)/&r #7& fo((oC)*%
!&for& ,#$r#)*% $ 2o!=
The number and type of data sources. >o" C)((
*&&/ $ ,#$%& for &$-7 /$#$ ,o"r-& 1o" C$*# #o $--&,,.
For &$-7 /)ff&r&*# #1+& of /$#$ ,o"r-& 1o" C)(( *&&/ $
/)ff&r&*# #1+& of ,#$%&.
The location of the data. I, 1o"r /$#$ o* $ *&#Cor;&/
/),; or $ #$+&U >o" m$1 f)*/ #7$# )f 1o"r /$#$ ), o* $
#$+&D 1o" C)(( *&&/ #o $rr$*%& for $ -",#om ,#$%& #o
&?#r$-# #7& /$#$.
Whether you will need to extract data from a
mainframe source. If #7), ), #7& -$,&D 1o" C)(( *&&/
E*#&r+r),& .VS E/)#)o* )*,#$((&/ $*/ 1o" C)(( ",&
m$)*fr$m& 2o!, #7$# $-#"$((1 r"* o* #7& m$)*fr$m&.
The content of the data. What columns are in your
data? Can you import the table definitions, or will
you need to define them manually? Are definitions
of the data items consistent between data sources?
The data warehouse. What do you want to store in
the data warehouse and how do you want to store
it?
Page 104 of 243
To assign a null value to a variable, use this syntax:
variable NULL
To assign a character string containing only the character
used to represent the null value to a variable, use this
syntax:
variable NULL.STR
Error, #7$# o--"r $, #7& f)(&, $r& (o$/&/ )*#o Or$-(& $r&
r&-or/&/ )* #7& s+ll#r (o% f)(&.
Rejected rows are written to the bad file. The main reason for
rejected rows is an integrity constraint in the target table; for
example, null values in NOT N!! columns, nonuni"ue values in
N#$% columns, and so on. The bad file is in the same format
as the input data file
&tring operators for'
(oncatenating strings with Cat or :
%xtracting sub strings with [ ]
H&((o. = .1 N$m& ), = H = . W7$#G, 1o"r,U
... &0$("$#&, #o=
H&((o. .1 *$m& ), T$rE$*. W7$#G, 1o"r,U
Field Function: R&#"r*, /&()m)#&/ ,"!,#r)*%, )* $ ,#r)*%
R&#"r*, /&()m)#&/ ,"!,#r)*%, )* $ ,#r)*%
.1S#r)*% O Fo*/o*_0181_NW2_AYF
S"!S#r)*% O F)&(/I.1,#r)*%D F_FD 2D 2B
\ r&#"r*, F0181_NW2F
AO 12345
AK3LO1212
T7& r&,"(# ), 121212.
.1S#r)*% O F1`2`3`4`5F
S#r)*% O F)&(/,#or& I.1S#r)*%D F`FD 2D 2D FA`4FB
\ $!o0& r&,"(#, )*= F1`$`4`4`5F
Operator Relation Example
Page 105 of 243
Eq or E9"$()#1 H O >
Ne or # or >< or <> I*&9"$()#1 H ` >D H aT >
Lt or < &,, #7$* H a >
Gt or > Gr&$#&r #7$* H T >
Le or < or < or #> &,, #7$* or &9"$( #o H aO >
Ge or > or > or #< Gr&$#&r #7$* or &9"$( #o H TO >
)ou cannot use relational operators to test for a null value.
se the IsNull function instead.
Tests if a variable contains a null value.
.1V$r O bN"(( P\ ,&#, 0$r)$!(& #o *"(( 0$("&
If I,N"((I.1V$r \ 10B T7&*
\ W)(( !& #r"& ,)*-& $*1 $r)#7m&#)- )*0o(0)*% $ *"(( 0$("&
\ r&,"(#, )* $ *"(( 0$("&.
E*/
IF Operator:
A,,)%*, $ 0$("& #7$# m&&#, #7& ,+&-)f)&/ -o*/)#)o*,
R&#"r* A or 4 /&+&*/)*% o* 0$("& )* 'o("m*1=
If Column1 > 100 Then "A" Else "B"
*unction +yTransform,-rg., -rg/, -rg01
2 Then and %lse clauses occupying a single line each'
#f -rg. +atches 3-...3
Then Reply 4 .
%lse Reply 4 /
2 +ulti5line clauses'
#f !en,arg.1 6 .7 Then
Reply 84 .
Reply 4 -rg/ 2 Reply
%nd %lse
Reply 84 /
Reply 4 ,-rg/ 5 .1 2 Reply
%nd
2 -nother style of multiline clauses'
#f !en,-rg.1 6 /7
Then
Reply 84 /
Reply 4 -rg0 2 Reply
%nd
%lse
Reply 84 9
Reply 4 ,-rg0 5 .1 2 Reply
%nd
Return,Reply1
'$((, $ ,"!ro"#)*&. No# $0$)($!(& )* &?+r&,,)o*,.
Page 106 of 243
yntax
Call subroutine K ( argument K ,argument L S ) L
&ubroutine +yRoutine-,#nput-rg, %rror(ode1
%rror(ode 4 7 ;2 set local error code
2 :hen calling a user5written routine that is held in the
2 ;ata&tage Repository, you must add a 3;&.3 <refix.
2 =e careful to supply another variable for the called
2 routine>s /nd argument so as to ?eep separate from our
own.
(all ;&.+yRoutine=,3*irst argument3, %rror(ode=1
#f %rror(ode= @6 7 Then
... ;2 called routine failed 5 ta?e action
%ndif
Return
Special DataStage BASIC Subroutines
;ata&tage provides some special ;ata&tage subroutines
for use in a beforeAafter subroutines or custom transforms.
)ou can'
!og events in the job>s log file using DSLogInfo,
DSLogWarn, DSLogFatal, and
DSTransformrror
%xecute ;O& or ;ata&tage %ngine commands using
DS!ecute
-ll the subroutines are called using the Call statement.
Logs an information message in a job's log file.
yntax
Call DSLogInfo (&essage, Calling'rog(ame)
Example
Call DSLogInfo"#Transforming: #:Arg$%
#&'Transform#(
Example
Call DSLogInfo"#Transforming: #:Arg$%
#&'Transform#(
Date( ) :
)eturns a date in its internal s'stem format*
Page 107 of 243
T+is e!ample s+o,s +o, to turn t+e current date in
internal form into a string representing t+e ne!t da':
Tomorro, - Ocon."Date"( / $% #D012&D#( 34
#$55617180#
Ereplace ,unction:
Formats data for output.:
R&+($-&, o*& or mor& )*,#$*-&, of $ ,"!,#r)*%.
yntax
Er&+($-& IstringD substringD replacement K Dnumber K DbeginL L
B
.1S#r)*% O FAA44''44DD44F
N&CS#r)*% O Er&+($-&I.1S#r)*%D F44FD FFB
\ T7& r&,"(# ), FAA''DDF
O F.TIF1234568FD F14R2FB H O F1234568.00F
H O F.TIF1234568FD F14R2^DFBH O
F.TIF12345FD F14\R2^DFB
H O F ^1D234D568.00F
H O F.TIF1234568FD F142FB H O F1234568.00F
H O F.TIF0012345FD F14RFB H O F0012345F
H O F.TIF0012345FD F14RYFB H O F12345F
H O F.TIF00000FD F14RYFB H O F F
H O F.TIF12345FD F14Q0QRFB H O F00000000012345F
H O F.TIFONE TWO THREEFD F10TFB H O FONE TWO F=T=FTHREE F
H O F.TIFONE TWO THREEFD F10RFB H O FONE TWO THF=T=FREE F
H O F.TIFAUSTRAIANSFD F5TFB H O FAUSTRF=T=FAIANF=T=FS F
H O F.TIF:<FD FR`````FB H O F :<F
H O F.TIF618<32:323FD F```5```````FB H O F6185<32:323F
H O F.TIF1234568:<FD F`35`35`3FB H O F123545658:<F
H O F.TIF1234568:<FD FR`5FB H O F568:<F
H O F.TIF68:<0FD FR`10FB H O F 68:<0F
H O F.TIF1234568:<FD F`5FB H O F12345F
H O F.TIF12345FD F`10FB H O F12345 F
H O F.TIF123456FD FR``5``5``FB H O F12534556F
H O F.TIF555666:<:FD F20\R2^DFB H O F\\\\\^555D666D:<:.00F
H O F.TIFDAVIDFD F10.FB H O FDAVID.....F
H O F.TIF24500FD F10R2^YFB H O F ^24500.00F
H O F.TIF0.1234568:E1FD F<\QFB H O F\1.2346E0F
Page 108 of 243
H O F.TIF23388<FD FRFB H O F23388<F
Date *on$ersions
T7& fo((oC)*% &?$m+(&, ,7oC #7& &ff&-# of 0$r)o", D ID$#&B
-o*0&r,)o* -o/&,.
Conversion Expression Internal Value
H O I-o*0IF31 DE' 1<68FD FDFB H O 0
H O I-o*0IF28 .A> <8FD FD2FB H O 10840
H O I-o*0IF05J28J<8FD FD2JFB H O 10840
H O I-o*0IF28J05J1<<8FD FDJEFB H O 10840
H O I-o*0IF1<<8 5 28FD FD >.DFB H O 10840
H O I-o*0IF28 .A> <8FD FD
D.>KDA3D2LFB
H O 10840
H O I-o*0IF5J28J<8FD FDJ.D>KYDYD2LFB H O 10840
H O I-o*0IF28 .A> 1<<8FD FD
D.>KDADLFB
H O 10840
H O I-o*0IF<8 05 28FD FD>.DK2D2D2LFB H O 10840
Date *on$ersions
T7& fo((oC)*% &?$m+(&, ,7oC #7& &ff&-# of 0$r)o", D ID$#&B
-o*0&r,)o* -o/&,.
Conversion Expression External Value
H O O-o*0I0D FDFB H O F31 DE' 1<68F
H O O-o*0I10840D FD2FB H O F28 .A> <8F
H O O-o*0I10840D FD2JFB H O F05J28J<8F
H O O-o*0I10840D FDJEFB H O F28J05J1<<8F
H O O-o*0I10840D FD5>3FB H O F1<<85148F
H O O-o*0I10840D FD2\3>FB H O F148\<8F
H O O-o*0I10840D FD >.DFB H O F1<<8 5 28F
H O O-o*0I10840D FD
.>KAD2LFB
H O F.A> <8F
H O O-o*0I10840D FD
D.>KDA3D2LFB
H O F28 .A> <8F
H O O-o*0I10840D
FDJ.D>KYDYD2LFB
H O F5J28J<8F
H O O-o*0I10840D FD
D.>KDADLFB
H O F28 .A> 1<<8F
H O O-o*0I10840D
FD>.DK2D2D2LFB
H O F<8 05 28F
Page 109 of 243
H O O-o*0I10840D FDQFB H O F2F
H O O-o*0I10840D FD.AFB H O F.A>F
H O O-o*0I10840D FDWFB H O F2F
H O O-o*0I10840D FDWAFB H O FTUESDA>F
O+&*S&9 F.W'o*#ro(F)(&,WF)(&1F To P$#7F0$r o-;&/
F)(&Pr&,&*# O bTr"&
E*/ T7&*
F)(&Pr&,&*# O bTr"&
E*/ E(,&
F)(&Pr&,&*# O bF$(,&
E*/
Example
This example shows how a before/after routine must be
declared as a subroutine at DataStage release 2. The
DataStage Manager will automatically ensure this when
you create a new before/after routine.
S"!ro"#)*& .1Ro"#)*&II*+"#Ar%D Error'o/&B
\ U,&r, -$* &*#&r $*1 ,#r)*% 0$("& #7&1 ();& C7&* ",)*%
\ .1Ro"#)*& from C)#7)* #7& 3o! D&,)%*&r. I# C)(( $++&$r
\ )* #7& 0$r)$!(& *$m&/ I*+"#Ar%.
\ T7& ro"#)*& -o*#ro(, #7& +ro%r&,, of #7& 2o! !1 ,&##)*%
\ #7& 0$("& of Error'o/&D C7)-7 ), $* O"#+"# $r%"m&*#.
\ A*1#7)*% *o*5E&ro C)(( ,#o+ #7& ,#$%& or 2o!.
Error'o/& O 0 P\ /&f$"(# r&+(1
\ Do ,om& +ro-&,,)*%...
...
R&#"r*
+y&tr 4 Trim,3 &tring with whitespace 31
2 ...returns 3&tring with whitespace3
+y&tr 4 Trim,3..Remove..redundant..dots....3, 3.31
2 ...returns 3Remove.redundant.dots3
+y&tr 4 Trim,3Remove..all..dots....3, 3.3, 3-31
2 ...returns 3Removealldots3
+y&tr 4 Trim,3Remove..trailing..dots....3, 3.3, 3T31
2 ...returns 3Remove..trailing..dots3
T7), (),# %ro"+, BASIC functionalit' under tas9s #o 7&(+
1o" f)*/ #7& r)%7# ,#$#&m&*# or f"*-#)o* #o ",&=
(ompiler ;irectives
;eclaration
Bob (ontrolABob &tatus
Page 110 of 243
<rogram (ontrol
&e"uential *iles <rocessing
&tring Cerification and *ormatting
&ubstring %xtraction and *ormatting
;ata (onversion
;ata *ormatting
!ocales
*unction +yTransform,-rg.1
=egin (ase
(ase -rg. 4 .
Reply 4 3-3
(ase -rg. 4 /
Reply 4 3=3
(ase -rg. 6 / -nd -rg. @ ..
Reply 4 3(3
(ase DTrue ;2 all other values
(all ;&Transform%rror,3=ad arg3'-rg., 3+yTransform3
Reply 4 33
%nd (ase
Return,ReplyB
DATASTAGE 67891 GUI FEATURES
New and Expanded Functionality to aid DataStage users
in job design and debugging.
New Stored Procedure Stage:
A *&C ,#or&/ +ro-&/"r& ,#$%& $((oC, ",&r, #o &$,)(1 ",&
Or$-(& ,#or&/ +ro-&/"r&, Cr)##&* )* PJSQ 0)$ O'I. T7&
S#or&/ Pro-&/"r& S#$%& ,"++or#, )*+"# $*/ o"#+"#
+$r$m&#&r, m$;)*% )# &$,)&r #o %&# )*form$#)o* !$-; from
Page 111 of 243
$ ,#or&/ +ro-&/"r&. I# -$* r&#"r* $ r&,"(# ,&# 0)$ o"#+"#
+$r$m&#&r, $*/ -$* r&#"r* mor& #7$* o*& roC )f #7&
+ro-&/"r& ",&, -"r,or,. T7& ,#$%& -$* $(,o &?&-"#& $
,#or&/ f"*-#)o* $*/ r&#"r*, ,#$#", )*form$#)o* from #7&
+ro-&/"r&.
HTML 1ob Reporting from the Designer:
A /&#$)(&/ +r)*#$!(& HT. form$# 2o! r&+or# -$* !& %&*&r$#&/
for #7& -"rr&*#(1 o+&* 2o1 or ,7$r&/ -o*#$)*&r. T7& r&+or# -$*
!& +ro/"-&/ ",)*% #7& *&C m&*" o+#)o* )* D&,)%*&r= F)(& 5T
G&*&r$#& R&+or#. T7& f)*$( HT. r&+or# -$* !& -",#om)E&/ !1
$++(1)*% /)ff&r&*# HS ,#1(& ,7&&#, #o #7& %&*&r$#&/ H. f)(&.
Changes to File & Directory Browser Form:
T7& o(/ ,#1(& F)(& @ D)r&-#or1 !roC,&r form 7$, !&&* r&+($-&/
C)#7 o*& mo/&(&/ o* #7& ,#$*/$r/ W)*/oC, 2K !roC,&r. T7&
*&C !roC,&r +ro0)/&, &*7$*-&/ f"*-#)o*$()#1 o* /)r&-#or1
*$0)%$#)o* I#r&&5or)&*#&/B $*/ f)(& ,&(&-#)o*D )# 7$, f)(#&r)*% $,
C&(( $, ,$0)*% $*/ r&,#or)*% -$+$!)()#)&, for #7& ($,# 0)&C&/ f)(&
(),#.
Ability to globally set Annotation properties:
T7& A**o#$#)o* +ro+&r#)&, /)$(o% ), +r&,&*#&/ )* #7& Too(, 5T
O+#)o*, /)$(o% $*/ #7& ,&##)*%, $r& ,$0&/ )* #7& r&%),#r1 +&r
",&r. T7& A**o#$#)o* ,#$%& $(C$1, /&f$"(#, #o #7& ,$0&/
,&##)*%,.
Ability to unset Environment Variables when a 1ob
Runs ($UNSET):
A ,+&-)$( 0$("& ^UNSET C$, )*#ro/"-&/ C7&r& #7&r& ), $ *&&/
for $ ",&r /&f)*&/ &*0)ro*m&*# 0$r)$!(& #o &?+()-)#(1 "*,&# #7&
U*)? &*0)ro*m&*# 0$r)$!(& #o )*/)-$#& f$(,&.
A /)$(o% #7$# +ro0)/&, )*form$#)o* $!o"# C7$# $(( #7& ,+&-)$(
&*0)ro*m&*# 0$r)$!(& 0$("&, $r& $*/ C7$# #7&1 $r& for ),
$0$)($!(& !1 /o"!(&5-()-;)*% $#=
5 3o! +ro+&r#)&, /)$(o%D P$r$m&#&r, #$!D C7&* &/)#)*% #7&
D&f$"(# V$("& -&(( for $ 2o! +$r$m&#&r /&f)*&/ $, $*
&*0)ro*m&*# 0$r)$!(&.
5 A/m)* '()&*#D E*0)ro*m&*# /)$(o%D C7&* &/)#)*% $ 0$("&
-&((.
Article$%%0
Transformer ACancelB operation0
If #7& '$*-&( !"##o* or aES'T ;&1 $r& +r&,,&/ from #7& m$)*
Tr$*,form&r /)$(o% $*/ -7$*%&, 7$0& !&&* m$/&D #7&* $
-o*f)rm$#)o* m&,,$%& !o? ), /),+($1&/D #o -7&-; #7$# #7& ",&r
C$*#, #o 9")# C)#7o"# ,$0)*% #7& -7$*%&,. If *o -7$*%&, 7$0&
!&&* m$/&D *o -o*f)rm$#)o* m&,,$%& ), /),+($1&/.
Page 112 of 243
Multi-Client Manager:
T7& +r&0)o",(1 "*,"++or#&/ Z'()&*# SC)#-7&r[ #oo( 7$, !&&*
&*7$*-&/ $*/ )*#&%r$#&/ )*#o #7& D$#$S#$%& '()&*#. T7), #oo(
$((oC, #7& ",&r, #o )*,#$(( $*/ ,C)#-7 !&#C&&* m"(#)+(& /)ff&r&*#
0&r,)o*, of #7& -()&*#. SC)#-7)*% !&#C&&* #7&m $(,o -7$*%&,
#7& /&,;#o+ ,7or#-"#, $*/ #7& S#$r# .&*" %ro"+ #o +o)*# #o
$*o#7&r )*,#$((&/ D$#$S#$%& -()&*#.
Enterprise Edition:
Complex Flat File Stage:
A *&C P$r$((&( 'om+(&? F($# F)(& ,#$%& 7$, !&&* $//&/ #o r&$/
or Cr)#& f)(&, #7$# -o*#$)* -om+(&? ,#r"-#"r&, Ifor &?$m+(&
%ro"+,D $rr$1,D r&/&f)*&,D o--"r, /&+&*/)*% o*D &#-.B. Arr$1,
from -om+(&? ,o"r-& -$* !& +$,,&/ $,5), or o+#)o*$((1 f($##&*&/
or *orm$()E&/.
Parallel 1ob Runtime Message Handling:
W7&* D$#$S#$%& +$r$((&( 2o!, $r& r"* #7&1 -$* %&*&r$#& $ ($r%&
*"m!&r of m&,,$%&, #7$# $r& (o%%&/ $*/ m$1 !& 0)&C&/ )* #7&
D)r&-#or '()&*#.
No#&= W7&* #7& o-$( R"* !"##o* ), /),$!(&/D 1o" -$**o# 0)&C
(o% )*form$#)o* from #7& D)r&-#or. Som&o*& $"#7or)E&/ #o /o
,o -$* &*$!(& #7& o-$( R"* 0)$ #7& A+)$r1.
.&,,$%& H$*/(&r, $((oC #7& ",&r #o -",#om)E& #7& ,&0&r)#1 of
)*/)0)/"$( m&,,$%&, $*/ -$* !& $++()&/ $# +ro2&-# of 2o! (&0&(.
.&,,$%&, -$* !& ,"++r&,,&/ from #7& (o% II*form$#)o* $*/
W$r*)*% m&,,$%&, o*(1BD +romo#&/ Ifrom I*form$#)o* #o
W$r*)*%B or /&mo#&/ Ifrom C$r*)*% #o I*form$#)o*B. A
m&,,$%& 7$*/(&r m$*$%&m&*# #oo( I$0$)($!(& from DS .$*$%&r
$*/ D)r&-#orB +ro0)/&, o+#)o*, #o &/)#D $// or /&(&#& m&,,$%&
7$*/(&r,. A *&C D)r&-#or o+#)o* $((oC, m&,,$%& 7$*/()*% #o
!& &*$!(&/J/),$!(&/ for #7& -"rr&*# 2o!.
Visual Cues in Designer - Designer time job validation:
For +$r$((&( 2o!, I)*-("/)*% +$r$((&( ,7$r&/ -o*#$)*&r,B $*/ 2o!
,&9"&*-&,D &rror, #7$# Co"(/ o--"r /"r)*% -om+)($#)o* $r&
o+#)o*$((1 +r&,&*#&/ o* #7& -$*0$, C)#7o"# r&9")r)*% #7& ",&r #o
&?+()-)#(1 -om+)(& #7& 2o!. If #7&r& $r& +o#&*#)$( +ro!(&m, C)#7
#7& ,#$%& #7$# Co"(/ -$",& $ -om+)($#)o* &rrorD $ C$r*)*%
#r)$*%(& )-o* IV),"$( '"&B ), ,7oC* o* #7& #o+ of #7& ,#$%&.
W7&* #7& ",&r 7o0&r, #7& mo",& o0&r $ ,#$%& C)#7 #7& V),"$(
'"&D $ #oo( #)+ ), /),+($1&/. T7& V),"$( '"&, -$* !& #"r*&/ off
0)$ $ #oo(!$r !"##o* I$ R#)-;G )m$%&B.
Additional properties for Parallel 1ob Stages:
Page 113 of 243
5 F)(& N$m& 'o("m* Io+#)o*$(B 6 $// $ -o("m* #o #7& ,#$%&
o"#+"# #7$# -o*#$)*, #7& *$m& of #7& f)(& #7$# #7& r&-or/ ),
,o"r-&/ from. A0$)($!(& o* S&9"&*#)$( F)(& $*/ F)(& S&#
S#$%&,.
5 So"r-& N$m& 'o("m* Io+#)o*$(B 6 $//, $ -o("m* #o #7&
,#$%& o"#+"# #7$# -o*#$)*, #7& *$m& of #7& ,o"r-& #7$# #7&
r&-or/ ), ,o"r-&/ from. A0$)($!(& o* E?#&r*$( So"r-&
S#$%&.
5 RoC N"m!&r 'o("m* Io+#)o*$(B 6 $//, $ -o("m* #o #7&
,#$%& o"#+"# #7$# -o*#$)*, #7& roC *"m!&r of #7& r&-or/.
A0$)($!(& o* S&9"&*#)$( F)(&D F)(& S&# $*/ E?#&r*$( So"r-&
S#$%&,.
5 R&$/ F)r,# RoC, Io+#)o*$(B 6 -o*,#r$)*, #7& ,#$%& #o o*(1
r&$/ #7& ,+&-)f)&/ *"m!&r of roC, from &$-7 f)(&.
A0$)($!(& o* S&9"&*#)$( F)(& S#$%&.
5 F)r,# )*& ), 'o("m* N$m&, Im$*/$#or1B 6 o* r&$/)*% #7),
#&((, #7& ,#$%& #o )%*or& #7& f)r,# ()*& ,)*-& )# -o*#$)*,
-o("m* *$m&,. O* Cr)#)*% )# -$",&, #7& f)r,# ()*& Cr)##&* #o
!& #7& -o("m* *$m&,. A0$)($!(& o* S&9"&*#)$( F)(& S#$%&.
View Data functionality on the Source & Target custom
stages:
5 V)&C /$#$ ,"++or# C$, $//&/ #o -",#om +$r$((&( ,#$%&, for
!o#7 ,o"r-& $*/ #$r%&#,.
5 ZS7oC f)(&[ 7$/ !&&* r&+($-&/ C)#7 ZV)&C D$#$[ for
P$r$((&( 3o!D S&9"&*#)$( F)(& $*/ F)(& S&# ,#$%&,.
New Parallel 1ob Advanced Developers Guide:
A *&C P$r$((&( 3o! A/0$*-&/ D&0&(o+&rG, G")/& %)0&,
D$#$S#$%& E*#&r+r),& E/)#)o* ",&r, )*form$#)o* o* &ff)-)&*# 2o!
/&,)%*D ,#$%& ",$%&D +&rform$*-& #"r*)*%D $*/ mor&. I# $(,o
/o-"m&*#, $(( of #7& +$r$((&( &*0)ro*m&*# 0$r)$!(&, $0$)($!(&
for ",&.
Page 114 of 243
DATASTAGE 4 DWH INTERVIEW
QUESTIONS
COMPANY: TCS (DataStage)
1. T&(( $!o"# 1o"r,&(fU
2. T1+&, of S#$%&,U E?$m+(&,
3. W7$# $r& $-#)0& ,#$%&, $*/ +$,,)0& ,#$%&,U
4. '$* 1o" f)(#&r /$#$ )* 7$,7&/ f)(&U INoB
5. D)ff&r&*-& !&#C&&* ,&9"&*#)$( $*/ 7$,7&/ f)(&U
6. HoC /o 1o" +o+"($#& #)m& /)m&*,)o*U
8. '$* C& ",& #$r%&# 7$,7&/ f)(& $, (oo;"+U I>&,B
:. W7$# ), .&r%& S#$%&U
<. W7$# ), 1o"r ro(&U
10. W7$# ), 3o! S&9"&*-&rU
11. W7$# $r& ,#$%&, )* ,&9"&*-&,U
12. HoC /o 1o" +$,, +$r$m&#&r,U
13. W7$# +$r$m&#&r, 1o" ",&/ )* 1o"r +ro2&-#U
14. W7$# $r& (o% #$!(&,U
15. W7$# ), 2o! -o*#ro(()*%U
16. F$-#, $*/ /)m&*,)o* #$!(&,U
18. 'o*f)rm&/ /)m&*,)o*,U
1:. T)m& /)m&*,)o* -o*#$)*, C7$# /$#$U I*"m&r)- /$#$B
1<. D)ff&r&*-& !&#C&&* OTP $*/ OAPU
20. D)ff&r&*-& !&#C&&* ,#$r ,-7&m$ $*/ ,*oC f($;& ,-7&m$U
21. W7$# $r& 7)&r$r-7)&,U E?$m+(&,U
22. W7$# $r& m$#&r)$()E&/ 0)&C,U
Page 115 of 243
23. W7$# ), $%%r&%$#)o*U
24. W7$# ), ,"rro%$#& ;&1U I, )# ",&/ for !o#7 f$-# $*/
/)m&*,)o* #$!(&,U
25. W71 /o 1o" %o for or$-(& ,&9"&*-& %&*&r$#or r$#7&r #7$*
/$#$,#$%& ro"#)*&U
26. F(oC of /$#$ )* /$#$,#$%&U
28. I*)#)$( (o$/)*% $*/ )*-r&m&*#$( (o$/)*%U
2:. W7$# ), S'DU T1+&,U
2<. HoC /o 1o" /&0&(o+ S'D #1+&2 )* 1o"r +ro2&-#U
30. HoC /o 1o" (o$/ /)m&*,)o* /$#$ $*/ f$-# /$#$U W7)-7 ),
f)r,#U
31. A*1 )/&$ $!o"# ,7&(( ,-r)+#)*% $*/ UNIHU
32. D)ff&r&*-& !&#C&&* or$-(& f"*-#)o* $*/ +ro-&/"r&U
33. D)ff&r&*-& !&#C&&* "*)9"& $*/ +r)m$r1 ;&1U
34. D)ff&r&*-& !&#C&&* "*)o* $*/ "*)o* $((U
35. W7$# ), m)*", o+&r$#orU
COMPANY: ACCENTURE (Datastage)
1. W7$# ), $"/)# #$!(&U
2. If #7&r& ), $ ($r%& 7$,7 f)(& $*/ $ ,m$((&r or$-(& #$!(& $*/ )f
1o" $r& (oo;)*% "+ from #r$*,form&r )* /)ff&r&*# 2o!, C7)-7
C)(( !& f$,#&rU
3. T&(( m& $!o"# S'DG,U
4. HoC /)/ 1o" )m+(&m&*# S'D )* 1o"r +ro2&-#U
5. Do $ !",)*&,, +&o+(& *&&/ #o ;*oC #7& ,"rro%$#& ;&1U
6. W7$# $r& /&r)0$#)o*, )* #r$*,form&rU
8. HoC /o 1o" ",& ,"rro%$#& ;&1 )* r&+or#)*%U
:. o%, 0)&C )* /$#$,#$%&D (o%, )* I*form$#)-$ C7)-7 ), -(&$rU
<. H$0& 1o" ",&/ $"/)# #$!(& )* 1o"r +ro2&-#U
10. W7$# ), ;&&*U H$0& 1o" ",&/ )# )* 1o"r +ro2&-#U
11. W7)(& /&0&(o+)*% 1o"r +ro2&-# C7$# $r& #7& -o*,)/&r$#)o*,
1o" #$;& f)r,# ();& +&rform$*-& or ,+$-&U
12. W7$# ), 2o! ,-7&/"(&rU H$0& 1o" ",&/ )#U HoC /)/ 1o" /oU
13. H$0& 1o" ",&/ /$#$,#$%& +$r$((&( &?#&*/&rU
14. W7$# ), #7& )*; P$r#)#)o*&r $*/ ()*; -o((&-#or ,#$%&U
15. HoC /o&, +)0o# ,#$%& Cor;U
16. W7$# ), ,"rro%$#& ;&1U W7$# ), #7& )m+or#$*-& of )#U HoC
/)/ 1o" )m+(&m&*# )# )* 1o"r +ro2&-#U
18. To#$((1 7oC m$*1 2o!, /)/ 1o" /&0&(o+&/ $*/ 7oC m$*1
(oo;"+, /)/ 1o" ",& #o#$((1U
1:. HoC /o -o*,#r$)*# )* #r$*,form&r Cor;U
1<. HoC C)(( 1o" /&-($r& $ -o*,#r$)*# )* /$#$,#$%&U
Page 116 of 243
20. HoC C)(( 1o" 7$*/(& r&2&-#&/ /$#$U
21. W7&r& #7& /$#$ ,#or&/ )* /$#$,#$%&U
22. G)0& m& ,om& +&rform$*-& #)+, )* /$#$,#$%&U
23. '$* C& ",& ,&9"&*#)$( f)(& $, $ (oo;"+U
24. HoC /o&, 7$,7 f)(& ,#$%& (oo;"+U
25. W71 -$*G# C& ",& ,&9"&*#)$( f)(& $, $ (oo;"+U
26. W7$# ), /$#$ C$r&7o",&U
28. W7$# ), RS#$r5S-7&m$GU
2:. W7$# ), RS*oCf($;&5S-7&m$GU
2<. W7$# ), /)ff&r&*-& !&#C&&* S#$r5S-7&m$ $*/ S*oCf($;&5
S-7&m$U
30. W7$# ), m&$* !1 ,"rro%$#& ;&1U
31. W7$# ), R'o*form&/ D)m&*,)o*GU
32. W7$# ), F$-#(&,, F$-# T$!(&U
33. W7&* C)(( C& ",& -o**&-#&/ $*/ "*-o**&-#&/ (oo;"+U
34. W7)-7 -$-7& ,"++or#, -o**&-#&/ $*/ "*-o**&-#&/ (oo;"+U
35. W7$# ), #7& /)ff&r&*-& !&#C&&* S'D T1+&2 $*/ S'D
T1+&3U
36. Dr$C #7& ET Ar-7)#&-#"r&U
38. Dr$C #7& DWH Ar-7)#&-#"r&U
3:. W7$# ), m$#&r)$()E&/ 0)&CU
3<. W7$# ), +ro-&/"r&U
40. W7$# ), F"*-#)o*U
41. W7$# ), #7& /)ff&r&*-& !&#C&&* +ro-&/"r& $*/ f"*-#)o*U
42. W7$# ), #r)%%&rU
43. W7$# $r& #1+&, of #r)%%&r,U
COMPANY: SATYAM (Datastage)
1. T&(( m& $!o"# 1o"r,&(fU
2. W7$# $r& #7& -()&*# -om+o*&*#,U
3. A!o"# $/m)*),#r$#orU W)#7 #7),D C7$# /o 1o" /o )* 1o"r
+ro2&-#U
4. W7$# ), 1o" +ro2&-# $*/ &?+($)* #7& +ro-&,,U
5. I*form$#)o*$( /)m&*,)o*,U
6. .&$,"r&,U
8. W7$# ), /$#$ m$r# ,)E& $*/ /$#$ C$r&7o",& ,)E&U
:. F$-# #$!(&U D)m&*,)o* #$!(&U
<. D$#$ .$r#U
10. HoC /o 1o" -(&$r ,o"r-& f)(&,U
11. P)0o# S#$%&U
12. HoC /o 1o" f)*/ $ ()*;D )f *o# fo"*/U
13. D)ff&r&*-& !&#C&&* #r$*,form&r $*/ ro"#)*&U
14. HoC /o 1o" ,&-"r& 1o"r +ro2&-#U
15. HoC /o 1o" 7$*/(& &rror,U E?-&+#)o* 7$*/(&r,U
16. HoC /o 1o" ;*oCD 7oC m$*1 roC, r&2&-#&/U
18. HoC /o 1o" m$*$%& ,"rro%$#& ;&1 )* /$#$,#$%&U
1:. W7$# ), (oo;"+U
1<. A%%r&%$#or S#$%&U
20. U*)0&r,& S#$%&U
Page 117 of 243
21. HoC /o 1o" m&r%& #Co #$!(&, )* /$#$,#$%&U
22. W7$# ), &?+or# $*/ )m+or#U
23. W7$# $r& I*#&%r$#)o* #&,#)*%D "*)# #&,#)*%D +&rform$*-&
#&,#)*%U
24. UAT #&,#)*%U IU,&r A--&+#$*-& T&,#)*%B
25. o-$(D /&0&(o+m&*#D +r&+ro/"-#)o*D +ro/"-#)o* ,&r0&rU
COMPANY: SYNTEL, Mumbai (DataStage - Telephonic
Interview).
Basic DWH:
1. T&(( m& $!o"# 1o"r -"rr&*# +ro2&-#U
2. W7$# ), 1o"r ro(& or 2o! +rof)(& )* #7& +ro2&-#U
3. W7$# ), 1o"r 3o! +rof)(&U
4. W7$# ), /)m&,)o* $*/ f$-#U
5. W7$# $r& #1+&, of /)m&*,)o*,U
6. W7$# $r& -o*f)rm&/ /)m&*,)o*,U
8. W7$# $r& %&*&r$#&/ /)m&*,)o*,U
:. W7$# $r& ,(oC(1 -7$*%)*% /)m&*,)o*,U
<. HoC m$*1 /$#$ m$r#, )* 1o"r +ro2&-#U
10. W7$# ), /$#$ m$r# *$m& )* 1o"r +ro2&-#U
11. W7$# ), #7& ,)E& of 1o"r /$#$ m$r#U
12. W7$# ), f$-#(&,, f$-# #$!(&U G)0& &?$m+(&.
13. HoC m$*1 f$-# #$!(&, $r& ",&/ )* #7& +ro2&-#U
14. W7$# ), 1o"r f$-# #$!(& *$m& )* 1o"r +ro2&-#U
15. HoC m$*1 /)m&*,)o* #$!(&, ",&/ )* #7& +ro2&-#U
16. W7$# $r& #7& *$m&, of #7& /)m&*,)o* #$!(&,U
Page 118 of 243
18. W7$# ), S-7&m$U T1+&,U E?+($)* S#$r5S-7&m$ $*/
S*oCf($;& S-7&m$ C)#7 /)ff&r&*-&. W7)-7 ,-7&m$ 1o"
",&/ )* 1o"r +ro2&-#U W71U
1:. W71 ,#$r5,-7&m$ -$((&/ $, ,#$r5,-7&m$U G)0& &?$m+(&.
1<. HoC fr&9"&*#(1 $*/ from C7&r& 1o" %&# #7& /$#$ $, ,o"r-&U
20. W7$# ), /)ff&r&*-& !&#C&&* /$#$ m$r# $*/ /$#$ C$r&7o",&U
21. W7$# ), -om+o,)#& ;&1U
22. W7$# ), ,"rro%$#& ;&1U W7&* 1o" C)(( %o for )#U
23. W7$# ), /)m&*,)o*$( mo/&()*%U
24. W7$# $r& S'D $*/ SGTU D)ff&r&*-& !&#C&&* #7&mU
E?$m+(& of SGT from 1o"r +ro2&-#.
25. HoC /o 1o" r$#& 1o"r,&(f )* /$#$ C$r&7o",&U
26. W7$# ), #7& ,#$#", of 1o"r -"rr&*# +ro2&-#U
DataStage:
28. HoC /o 1o" )m+or# 1o"r ,o"r-& $*/ #$r%&#,U W7$# $r& #7&
#1+&, of ,o"r-&, $*/ #$r%&#,U
2:. W7$# ), A-#)0& S#$%&, $*/ P$,,)0& S#$%&, m&$*, )*
/$#$,#$%&U
2<. W7$# ), /)ff&r&*-& !&#C&&* I*form$#)-$ $*/ D$#$S#$%&U
W7)-7 /o 1o" #7)*; ), !&,#U
30. W7$# $r& #7& ,#$%&, 1o" ",&/ )* 1o"r +ro2&-#U
31. W7om /o 1o" r&+or#U
32. W7$# ), or-7&,#r$#&U D)ff&r&*-& !&#C&&* or-7&,#r$#& $*/
/$#$,#$%&U
33. W7$# ), +$r$((&( &?#&*/&rU H$/ 1o" Cor; o* #7),U
34. W7$# /o 1o" m&$* !1 +$r$((&( +ro-&,,)*%U
35. W7$# ), /)ff&r&*-& !&#C&&* .&r%& S#$%& $*/ 3o)* S#$%&U
36. W7$# ), /)ff&r&*-& !&#C&&* 'o+1 S#$%& $*/ Tr$*,form&r
S#$%&U
38. W7$# ), /)ff&r&*-& !&#C&&* OD4' S#$%& $*/ O'I S#$%&U
3:. W7$# ), /)ff&r&*-& !&#C&&* oo;"+ S#$%& $*/ 3o)* S#$%&U
3<. W7$# ), /)ff&r&*-& !&#C&&* '7$*%& '$+#"r& S#$%& $*/
D)ff&r&*-& S#$%&U
40. W7$# ), /)ff&r&*-& !&#C&&* H$,7&/ f)(& $*/ S&9"&*#)$(
F)(&U
41. W7$# $r& /)ff&r&*# 3o)*, ",&/ )* 3o)* S#$%&U
42. HoC 1o" /&-)/& C7&* #o %o for 2o)* ,#$%& $*/ (oo;"+
,#$%&U
43. W7$# ), +$r#)#)o* ;&1U W7)-7 ;&1 ), ",&/ )* ro"*/ ro!)*
+$r#)#)o*U
44. HoC /o 1o" 7$*/(& S'D )* /$#$,#$%&U
45. W7$# $r& '7$*%& '$+#"r& S#$%& $*/ '7$*%& A++(1 S#$%&,U
46. HoC m$*1 ,#r&$m, #o #7& #r$*,form&r 1o" -$* %)0&U
48. W7$# ), +r)m$r1 ()*; $*/ r&f&r&*-& ()*;U
4:. W7$# ), ro"#)*&U W7$# ), !&for& $*/ $f#&r ,"!ro"#)*&,U
T7&,& $r& r"* $f#&rJ!&for& 2o! or ,#$%&U
4<. H$/ 1o" Cr)#& $*1 ,"!ro"#)*&, )* 1o"r +ro2&-#U
50. W7$# ), 'o*f)% F)(&U E$-7 2o! 7$0)*% )#, oC* -o*f)% f)(& or
o*& ), *&&/&/U
Page 119 of 243
51. W7$# ), No/&U
52. W7$# ), IP' S#$%&U W7$# )# )*-r&$,& +&rform$*-&U
53. W7$# ), S&9"&*#)$( !"ff&rU
54. W7$# $r& )*; P$r#)o*&r $*/ )*; 'o((&-#orU
55. W7$# $r& #7& +&rform$*-& #"**)*% 1o" 7$0& /o*& )* 1o"r
+ro2&-#U
56. D)/ 1o" /o*& ,-7&/"()*%U HoCU '$* 1o" ,-7&/"(& $ 2o! $#
#7& &0&r1 &*/ /$#& of mo*#7U HoCU
58. W7$# ), 2o! ,&9"&*-&U H$/ 1o" r"* $*1 2o!,U
5:. W7$# ), ,#$#", 0)&CU W71 1o" -(&$r #7),U If 1o" -(&$r #7&
,#$#", 0)&C C7$# )*#&r*$((1 /o*&U
5<. W7$# ), 7$,7&/ f)(&U W7$# $r& #7& #1+&, of 7$,7&/ f)(&U
W7)-7 1o" ",&U W7$# ), /&f$"(#U W7$# ), m$)* $/0$*#$%&
of 7$,7&/ f)(&U D)ff&r&*-& !&#C&&* #7&m. I,#$#)- $*/
/1*$m)-B
60. W7$# $r& -o*#$)*&r,U G)0& &?$m+(& from 1o"r +ro2&-#.
61. H$/ 1o" /o*& $*1 7$r/C$r& -o*f)%"r$#)o* C7)(& r"**)*%
+$r$((&( 2o!,U
62. W7$# $r& o+&r$#or, )* +$r$((&( 2o!,U
63. W7$# $r& +$r$m&#&r, $*/ +$r$m&#&r f)(&U
64. '$* 1o" ",& 0$r)$!(&,U I* C7)-7 ,#$%&,U
65. HoC /o 1o" -o*0&r# -o("m*, #o roC, $*/ roC, #o -o("m*,
)* /$#$,#$%&U IU,)*% P)0o# S#$%&B.
66. W7$# ), P)0o# S#$%&U
68. W7$# ), &?&-"#)o* f(oC of -o*,#r$)*#,D /&r)0$#)o*, $*/
0$r)$!(&, )* #r$*,form&r ,#$%&U W7$# $r& #7&,&U
6:. HoC /o 1o" &()m)*$#& /"+()-$#&, )* /$#$,#$%&U '$* 1o" ",&
7$,7 f)(& for )#U
6<. If 1
,#
$*/ :
#7
r&-or/ ), /"+()-$#& #7&* C7)-7 C)(( !& ,;)++&/U
'$* 1o" -o*f)%"r& )#U
80. HoC /o 1o" )m+or# $*/ &?+or# /$#$,#$%& 2o!,U W7$# ), #7&
f)(& &?#&*,)o*U IS&& &$-7 -om+o*&*# C7)(& )m+or#)*% $*/
&?+or#)*%B.
81. HoC /o 1o" r$#& 1o"r,&(f )* D$#$S#$%&U
82. E?+($)* D$#$S#$%& Ar-7)#&-#"r&U
83. W7$# ), r&+o,)#or1U W7$# $r& #7& r&+o,)#or1 )#&m,U
84. W7$# ), /)ff&r&*-& !&#C&&* ro"#)*& $*/ #r$*,formU
85. I 7$0& 10 #$!(&, C)#7 fo"r ;&1 -o("m* 0$("&,D )* #7),
,)#"$#)o* (oo;"+ ), *&-&,,$r1D !"# C7)-7 #1+& of (oo;"+ ),
",&/U E)#7&r O'4' or H$,7&/ f)(& (oo;"+U W71U
86. W7&* 1o" Cr)#& #7& ro"#)*&,U
88. I* o*& +ro2&-# 7oC m$*1 ,7$r&/ -o*#$)*&r, $r& -r&$#&/U
8:. HoC /o 1o" +ro#&-# 1o"r +ro2&-#U
8<. W7$# ), #7& -om+(&? ,)#"$#)o* 1o" f$-&/ )* D$#$S#$%&U
:0. HoC C)(( 1o" mo0& 7$,7&/ f)(& from o*& (o-$#)o* #o
$*o#7&r (o-$#)o*U
:1. HoC C)(( 1o" -r&$#& ,#$#)- 7$,7&/ f)(&U
:2. HoC m$*1 3o!, 1o" 7$0& /o*& )* 1o"r +ro2&-#U E?+($)*
o*& of -om+(&? 3o!.
Page 120 of 243
COMPANY: KANBAY, Pune (DataStage - Personal
Interview)
1. A(( $!o"# -om+$*1 /&#$)(,D +ro2&-# /&#$)(,D $*/ -()&*#
/&#$)(,D ,$m+(& /$#$ of 1o"r ,o"r-&U
2. D$#$S#$%& Ar-7)#&-#"r&U
3. S1,#&m 0$r)$!(&D C7$# $r& ,1,#&m 0$r)$!(&, ",&/ 1o"r
+ro2&-#U
4. W7$# $r& #7& /)ff&r&*# /$#$,#$%& f"*-#)o*, ",&/ )* 1o"r
+ro2&-#U
5. D)ff&r&*-& !&#C&&* ,#$r ,-7&m$ $*/ ,*oC f($;& ,-7&m$U
6. W7$# ), -o*f)rm&/D /&%&*&r$#&/ $*/ 2"*; /)m&*,)o*U
8. W7$# $r& -o*f)rm&/ f$-#,U
:. D)ff&r&*# #1+& of f$-#, $*/ #7&)r &?$m+(&,U
<. W7$# $r& $++ro$-7&, )* /&0&(o+)*% /$#$ C$r&7o",&U
10. D)ff&r&*# #1+&, of 7$,7&/ f)(&,U
11. W7$# $r& ro"#)*&, $*/ #r$*,form,U HoC 1o" ",&/ )* 1o"r
+ro2&-#U
12. D)ff&r&*-& !&#C&&* D$#$ .$r# $*/ D$#$ W$r&7o",&U
13. W7$# ), ,"rro%$#& ;&1U HoC /o 1o" %&*&r$#& )#U
14. W7$# $r& &*0)ro*m&*# 0$r)$!(&, $*/ %(o!$( 0$r)$!(&,U
15. HoC /o 1o" )m+ro0& #7& +&rform$*-& of #7& 2o!U
16. W7$# ), S'DU HoC /o 1o" /&0&(o+&/ S'D #1+&1 $*/ S'D
#1+&2U
18. W71 /o 1o" %o for or$-(& ,&9"&*-& #o %&*&r$#& ,"rro%$#&
;&1 r$#7&r #7$* /$#$,#$%& ro"#)*&,U
1:. HoC /o 1o" %&*&r$#& ,"rro%$#& ;&1 )* /$#$,#$%&U
1<. W7$# ), 2o! ,&9"&*-&U
20. W7$# $r& +("%5)*,U
21. HoC m"-7 /$#$ 1o" -$* %&# &0&r1 /$1U
22. W7$# ), #7& !)%%&,# #$!(& $*/ ,)E& )* 1o"r ,-7&m$ or )* 1o"r
+ro2&-#U
23. W7$# ), #7& ,)E& of /$#$ C$r&7o",& I!1 (o$/)*% /$#$BU
24. HoC /o 1o" )m+ro0& #7& +&rform$*-& of #7& 7$,7&/ f)(&U
25. W7$# ), IP' S#$%&U
26. W7$# $r& #7& /)ff&r&*# #1+&, of ,#$%&, $*/ ",&/ )* 1o"r
+ro2&-#U
28. W7$# $r& #7& o+&r$#)o*, 1o" -$* /o )* IP' S#$%& $*/
#r$*,form&r ,#$%&U
2:. W7$# ), m&r%& ,#$%&U HoC /o 1o" m&r%& #Co f($# f)(&,U
2<. I 7$0& #Co #$!(&D )* o*& #$!(& -o*#$)*, 100 r&-or/, $*/
o#7&r #$!(& -o*#$)*, 1000 r&-or/, C7)-7 #$!(& ), #7& m$,#&r
#$!(&U W71U
30. I 7$0& o*& 2o! from o*& f($# f)(&. I 7$0& #o (o$/ /$#$ #o
/$#$!$,&D 10 ($;7, r&-or/, $r& #7&r&D $f#&r (o$/)*% < ($;7,
2o! ), $!or#&/U HoC /o 1o" (o$/ r&m$)*)*% r&-or/,U
31. W7)-7 /$#$ 1o"r +ro2&-# -o*#$)*,U
32. W7$# ), #7& ,o"r-& )* 1o"r +ro2&-#U
Page 121 of 243
COMPANY: IBM, Bangalore (DataStage - Telephonic
Interview)
1. T&(( m& $!o"# 1o"r &/"-$#)o*$( $*/ +rof&,,)o*$(
!$-;%ro"*/U
2. W7$# ), #&$m ,)E&U W7$# ), 1o"r ro(& )* #7$#U
3. W7$# ), f$-# (&,, f$-# #$!(&U A, )# /o*G# 7$0& f$-#, #7&*
C7$#G, #7& +"r+o,& of ",)*% )#U H$/ 1o" ",&/ )* 1o"r
+ro2&-#U
4. HoC m$*1 2o!, 1o" 7$0& /o*& )* 1o"r +ro2&-#U
5. >o" 7$*/(&/ /)ff&r&*# -om+(&? (o%)- 2o!, )* 1o"r +ro2&-# or
*o#U
6. O"# of $(( 2o!, 1o" 7$0& /o*&D C7$# ), mo,# -om+(&? 2o! "
f&&(U E?+($)* )#U
8. >o" /o 1o"r,&(f #7& -om+(&? (o%)- or ,om&o*& %)0& 1o"
#7& ,+&-)f)-$#)o*, $*/ 1o" -o*0&r# #7&m #o /$#$,#$%&U
:. W7$# $r& #7& ,o"r-&, 1o" ",&/ )* 1o"r +ro2&-#U
<. W7$# $r& #7& ,#$%&, 1o" ",&/ )* 1o"r +ro2&-#U
10. W7$# ), /)ff&r&*-& !&#C&&* OD4' $*/ ORA'E O'I
,#$%&U
11. A, 1o" #o(/D )f 1o"r ,o"r-&, $r& f($# f)(&, $*/ ORA'E
O'I #7&* C71 1o" *&&/ OD4' )* 1o"r +ro2&-# r$#7&r #7$*
ORA'E O'I ,#$%&U
12. W7$# /)ff&r&*-& !&#C&&* ,&9"&*#)$( f)(& $*/ 7$,7&/ f)(&U
13. '$* 1o" ",& ,&9"&*#)$( f)(& $, ,o"r-& #o 7$,7&/ f)(&U H$0&
1o" /o*& )#U W7$# &rror )# C)(( %)0&U
14. W71 7$,7&/ f)(& )m+ro0& #7& +&rform$*-&U
15. HoC /o 1o" ,or# 1o"r /$#$ )* 2o!,U
16. H$/ 1o" ",& ,or# ,#$%& )* 1o"r 2o!U I,or# ,#$%& ), +$r$((&(
,#$%&D !& ,"r& #7$# 1o" $r& ",)*% ,&r0&r 2o!, o*(1D #7&* 7&
C)(( $,; Q.12B
18. '$* $%%r&%$#or $*/ #r$*,form&r ,#$%& ",&/ for ,or#)*% /$#$U
HoC
1:. If I 7$0& #Co ,o"r-&, #o $%%r&%$#or ,#$%& $*/ or$-(& $,
#$r%&#D I -$* ,or# /$#$ )* $%%r&%$#or !"# )f I /o*G# C$*# #o
",& $%%r&%$#or #o ,or# /$#$ #7&* 7oC 1o" C)(( /o )#U
1<. W71 C& ",& ,"rro%$#& ;&1 )* /$#$ C$r&7o",&U HoC )# C)((
)m+ro0& #7& +&rform$*-&U W7&r& )# C)(( ,#or&U HoC /o 1o"
7$*/(& 1o"r ,"rro%$#& ;&1 )* 1o"r +ro2&-#U W7&r& C& ",&
mo,#(1 ,"rro%$#& ;&1U
Page 122 of 243
20. HoC m$*1 )*+"# ()*;, 1o" -$* %)0& #o #r$*,form&rU
21. '$* 1o" %)0& mor& #7$* o*& ,o"r-& #o #r$*,form&rU IIf 1o"
,$1 ZNo[ 7& C)(( $,; C7$# &rror )# C)(( %)0& C7&* 1o" #r1 #o
/o #7),UB
22. D&f)*)#)o* of S(oC(1 '7$*%)*% D)m&*,)o*,U T1+&,U
23. If $ -om+$*1 m$)*#$)*)*% #1+&1 S'DD *oC #7& -om+$*1
/&-)/&/ #o -7$*%& #7&r& +($* #o m$)*#$)* #1+&2 S'DD &.%.
-",#om&r #$!(&D ,o C7$# $r& #7& -7$*%&, #o /o )* -",#om&r
#$!(&U IW7&#7&r 1o" 7$0& #o -7$*%& #7& ,#r"-#"r& of #7&
#$!(&D )f )# ), "*/&r #1+&3 r)%7#U Or *o -7$*%&,U HoC /o
1o" )m+(&m&*# #7),UB
24. HoC m$*1 /)m&*,)o*, )* 1o"r +ro2&-#U W7$# $r& #7&1U
25. W7$# $r& #7& f$-#, )* 1o"r f$-# #$!(&U
26. Ar& $(( #7&,& f$-#, $r& ,+&-)f)- Ir&($#&/B #o $(( /)m&*,)o*,U
28. HoC /o 1o" %&# ,1,#&m /$#& )* or$-(&U
2:. W7$# ), $ /"$( #$!(& )* or$-(&U
2<. W7$# ), #7& ",& of UNION )* or$-(&U If I Cr)#& 9"&r1 ,&(&-#
\ from E.P UNION ,&(&-# \ from /&+#D ), )# &?&-"#&/
C&((U
30. I 7$0& $ 9"&r1 ,&(&-# \ from E.P #$!(& %ro"+ !1 /&+#P ),
#7), 9"&r1 &?&-"#&/U If *o C7$# ), #7& &rrorU
MORE QUESTIONS ON DATASTAGE:
1. W7$# $r& #7& /)ff)-"(#)&, f$-&/ )* ",)*% D$#$S#$%&U
2. W7$# $r& #7& -o*,#r$)*#, )* ",)*% D$#$S#$%&U
3. HoC /o 1o" &()m)*$#& /"+()-$#& roC,U
4. HoC /o C& /o #7& $"#om$#)o* of /,2o!,U
5. W7$# $r& H. f)(&,U HoC /o 1o" r&$/ /$#$ from H.
f)(&, $*/ C7)-7 ,#$%& #o !& ",&/U
6. HoC /o 1o" -$#-7 !$/ roC, from O'I ,#$%&U
8. W71 /o 1o" ",& SQ OADER or O'I STAGEU
:. HoC /o 1o" +o+"($#& ,o"r-& f)(&,U
<. HoC /o 1o" +$,, f)(&*$m& $, #7& +$r$m&#&r for $ 2o!U
10. HoC /o 1o" +$,, #7& +$r$m&#&r #o #7& 2o! ,&9"&*-& )f #7&
2o! ), r"**)*% $# *)%7#U
11. W7$# 7$++&*, )f #7& 2o! f$)(, $# *)%7#U
12. W7$# ), SQ #"*)*%U HoC /o 1o" /o )#U
13. W7$# ), +ro2&-# ()f& -1-(& $*/ 7oC /o 1o" )m+(&m&*# )#U
14. HoC C)(( 1o" -$(( &?#&r*$( f"*-#)o* or ,"!ro"#)*& from
/$#$,#$%&U
15. HoC /o 1o" #r$-; +&rform$*-& ,#$#),#)-, $*/ &*7$*-& )#U
16. HoC /o 1o" /o or$-(& 4 C$1 )**&r 2o)* )f #7&r& $r& 4 or$-(&
)*+"# f)(&,U
18. E?+($)* 1o"r ($,# +ro2&-# $*/ 1o"r ro(& )* )#U
1:. W7$# $r& #7& of#&* ",&/ S#$%&, or ,#$%&, 1o" Cor;&/ C)#7
)* 1o"r ($,# +ro2&-#U
1<. HoC m$*1 2o!, 7$0& 1o" -r&$#&/ )* 1o"r ($,# +ro2&-#U
Page 123 of 243
20. HoC /o 1o" m&r%& #Co f)(&, )* DSU
21. W7$# ), DS .$*$%&r ",&/ for 5 /)/ " ",& )#U
22. W7$# ), DS D)r&-#or ",&/ for 5 /)/ " ",& )#U
23. W7$# ), DS A/m)*),#r$#or ",&/ for 5 /)/ " ",& )#U
24. W7$# ), DS D&,)%*&r ",&/ for 5 /)/ " ",& )#U
25. E?+($)* #7& /)ff&r&*-&, !&#C&&* Or$-(&:)J<)U
26. Do 1o" ;*oC $!o"# INTEGRIT>JQUAIT> ,#$%&U
28. Do 1o" ;*oC $!o"# .ETASTAGEU
2:. D)ff&r&*-& !&#C&&* H$,7f)(& $*/ S&9"&*#)$( F)(&U
2<. W7$# ), )-o*0 $*/ o-o*0 f"*-#)o*,U
30. HoC -$* C& 2o)* o*& Or$-(& ,o"r-& $*/ S&9"&*#)$( f)(&U
31. HoC -$* C& )m+(&m&*# S(oC(1 '7$*%)*% D)m&*,)o*, )*
D$#$S#$%&U
32. HoC -$* C& )m+(&m&*# oo;"+ )* D$#$S#$%& S&r0&r 2o!,U
33. W7$# $r& $(( #7& #7)r/ +$r#1 #oo(, ",&/ )* D$#$S#$%&U
34. W7$# ), #7& /)ff&r&*-& !&#C&&* ro"#)*& $*/ #r$*,form $*/
f"*-#)o*U
35. W7$# $r& #7& 3o! +$r$m&#&r,U
36. HoC -$* C& )m+ro0& #7& +&rform$*-& of D$#$S#$%& 2o!,U
38. HoC -$* C& -r&$#& 'o*#$)*&r,U
3:. W7$# $!o"# S1,#&m 0$r)$!(&,U
3<. W7$# ), /)ff&r&*-& !&#C&&* o+&r$#)o*$( /$#$ ,#$%& IODSB @
/$#$ C$r&7o",&U
40. HoC /o 1o" f)? #7& &rror FO'I 7$, f&#-7&/ #r"*-$#&/ /$#$F
)* D$#$S#$%&U
41. HoC #o -r&$#& !$#-7&, )* D$#$,#$%& from -omm$*/ +rom+#
42. HoC /o 1o" &()m)*$#& /"+()-$#& roC,U
43. S"++o,& )f #7&r& $r& m)(()o* r&-or/,D /)/ 1o" ",& O'IU If
*o# #7&* C7$# ,#$%& /o 1o" +r&f&rU
44. W7$# ), #7& or/&r of &?&-"#)o* /o*& )*#&r*$((1 )* #7&
#r$*,form&r C)#7 #7& ,#$%& &/)#or 7$0)*% )*+"# ()*;, o* #7& (f#
7$*/ ,)/& $*/ o"#+"# ()*;,U
45. I C$*# #o +ro-&,, 3 f)(&, )* ,&9"&*#)$((1 o*& !1 o*&D 7oC I
-$* /o #7$#. W7)(& +ro-&,,)*% #7& f)(&, )# ,7o"(/ f&#-7 f)(&,
$"#om$#)-$((1.
Datastage:
1. HoC #o -r&$#& $ f($# f)(& 2o!S I,#&+,B
2. I, #7&r& $*1 #oo( !1 $,-&*#)$( #o +"(( #7& m&#$/$#$
from 0$r)o", ,o"r-&,
3. W7$# )f /&f)*)#)o* of $ #$!(& -7$*%&,...C7$# )m+$-#
C)(( )# 7$0& o* "r 2o!...
4. 7oC #o ",& /&!"%%&r
5. 7oC " ,-7&/"(& $ DS 2o! 0)$ "*)? ,-r)+#
6. A*1 #7)r/ +$r#1 #oo(, for ,-7&/"()*% #7& 2o!,
8. 7oC #o ",& 7$,7 f)(&...7oC #o -r&$#& H$,7 f)(&...
:. A%%r&%$#or Tr$*,form$#)o*,..
<. +r& ,9( +o,# ,9(..HoC #o ",& #7&,&...#r"*-$#& #$!(&
10. C7$# ), #7& ",& of $/m)*),#r$#or ), ",&/
11. C7$# C$, #7& mo,# -om+(&? m$++)*% " 70
/&0&(o+&/ ",)*% /$#$,#$%&
Page 124 of 243
12. 7oC m"-7 &?+ " 70 o* DS
13. )f #$!(& /&f)*)#)o* 7$, !&&* -7$*%&/ )* m$*$%&r
C)(( )# $"#om$#)-$((1 +ro+o%$#& )*#o 3O!
14. '$* o"# ()*; from o*& $-#)0& ,#$%& -$* !&-om&
)*o"# ()*; )* $*o#7&r $-#)0& ,#$%&
15. '$* " ",& $ ,&9"&*#)$( f)(& $, $ r&f&r&*-&
f)(&.../)ff&r&*-& !&#C&&* $ ,&9"&*#)$( f)(& $*/ $ 7$,7 f)(& ABNO
16. W7$# /)ffr&*# o+#)o*, $r& #7&r& #o ,&& $ #$!(&
/&f)*)#)o*..
18. W7$# $(( +ro/"-#, of $,-&*#)$( " r $C$r& of
1:. W7$# ), #7& $/0$*#$%& of ",)*% O'I ,#$%& $,
-om+$r&/ #o OD4' ,#$%&
1<. Norm$()E&r Tr$*,form$#)o*..
20. C7$# ,#&+, C)(( 1o" #$;& #o )*-r&$,& +&rform$*-& )*
D$#$,#$%& for ($r%& 0o("m&, of /$#$
21. C7$# $r& !r)/%& #$!(&,
22. T1+&, of I*/&?&,
23. T$!(& P$r#)#)o*)*%
24. T1+&, of ,-7&m$,D&?+($)*
25. HoC /o 1o" /o r&9")r&m&*#, %$#7&r)*% )* -$,& of
*o*5$0$)($!)()#1 of #7& +&r,o**&( $*/ #7&r&$f#&r #7& +ro2&-# +($*
26. HoC /o 1o" #$;& -$r& of "*;*oC* 0$("&, for #7&
+r)m$r1 ;&1 for /)m&*,)o*U
28. F$-#(&,, f$-# #$!(&,
2:. O0&r0)&C of D$#$,#$%& +ro2&-#,
2<. )*; P$r#)#)o*&rJ 'o((&-#or
Data stage:
1. W7$# ), ET Ar-7)#&-#"r&U
2. E?+($)* 1o"r +ro2&-# Ar-7)#&-#"r&U
3. HoC m$*1 D$#$ m$r#, $*/ 7oC m$*1 f$-#, $*/
/)m&*,)o*, A0$)($!(& )* 1o"r +ro2&-#U
4. W7$# ), #7& ,)E& of 1o"r D$#$ m$r#U
5. HoC m$*1 #1+&, of (o$/)*%5#&-7*)9"&, $r&
A0$)($!(&U
6. 4&for& %o)*% #o /&,)%* 2o!, )* D$#$ ,#$%& C7$# $r&
+r&-&/)*%5,#&+, )* D$#$ ,#$%&U
8. W7$# ), #7& Ar-7)#&-#"r& of D$#$ ,#$%&U
:. W7$# ), #7& .$)* /)ff&r&*-& !&#C&&* /)ff&r&*#
-()&*# -om+o*&*#, )* D$#$ ,#$%&U
<. W7$# $r& #7& /)ff&r&*# ,#$%& 1o" 7$0& Cor;&/ o*
)#U
10. '$* I -$(( +ro-&/"r&, )* #o /$#$,#$%&.)f ,o HoC #o
-$(( ,#or&5 +ro-&/"r&, )* D$#$ ,#$%&U
11. W7$# ), #7& /)ff&r&*-& !&#C&&* ,&9"&*#)$( f)(& $*/
7$,7f)(&U '$* C& ",& ,&9"&*#)$( f)(& $, $ (oo;"+U '$* C& +"#
f)(#&r -o*/)#)o*, o* ,&9"&*#)$( f)(&U
12. D)ff&r&*-&, !&#C&&* DRS S#$%& $*/ OD4'U
W7)-7 o*& ), #7& !&,# for +&rform$*-&U
Page 125 of 243
13. W7$# $r& #7& /)ff&r&*# +&rform$*-& #"**)*% $,+&-#,
$r& #7&r& )* D$#$ ,#$%&U
14. HoC /o 1o" r&mo0& #7& /"+()-$#&, )* f($#5f)(&U
15. W7$# ), #7& /)ff&r&*-& !&#C&&* I*#&r+ro-&,, $*/
)*+ro-&,,U W7)-7 o*& ), #7& !&,#U
16. W7$# ), 'R'32U O* C7)-7 ,)#"$#)o* %o for
'R'32U
18. W7$# ), $ +)0o#,#$%&U '$* " &?+($)* o* ,-&*$r)o
C7)-7 ,)#"$#)o* ",&/ )* 1o"r +ro2&-#U
1:. W7$# ), roC5,+()#&r $*/ roC5m&r%&r -$* I ",&
,&+$r$#&(1 ), )# +o,,)!(& #o /o )#U
1<. If o*& ",&r (o-;&/ #7& r&,o"r-&U HoC #o r&(&$,& #7&
+$r#)-"($r 3o!U
20. W7$# ), $ 0&r,)o*5-o*#ro(( )* /$#$ ,#$%&U
21. W7$# ), #7& /)ff&r&*-& !&#C&&* -(&$r(o%5f)(&U
'(&$r,#$%&5f)(&U
22. HoC #o ,-&7"/(& 2o!, C)#7 o"# ",)*% D$#$ ,#$%&U
23. W7$# ), #7& /)ff&r&*-& !&#C&&* S#$#)-57$,7 $*/
/1*$m)-7$,7f)(&U
24. HoC #o /o &rror 7$*/()*% )* /$#$ ,#$%&U
25. W7$# ), #7& /)ff&r&*-& !&#C&&* A-#)0& ,#$%& $*/
+$,,)0& ,#$%&U W7$# $r& #7& A-#)0& $*/ +$,,)0& ,#$%&,U
26. HoC #o ,&# E*0)ro*m&*# 0$r)$!(&, )* /$#$,#%&U
28. W7$# ), 2o! -o*#ro((&/ ro"#)*"&U HoC ,&# 2o!
+$r$m&#&r )* D$#$ ,#$%&U
2:. HoC #o r&(&$,& $ 2o!U
2<. HoC #o /o A"#o5+"r%& )* D$#$ ,#$%&U
30. W7$# ), #7& /)ff&r&*-& !&#C&&* D$#$,#%&8.1 $*/
8.5U
DATA WAREHOUSING QUESTIONS:
1. W7$# $r& #7& /)ff&r&*# D)m&*,)o*$(
mo/&()*% T&-7*)9"&, $r& A0$)($!(&U
2. W7$# ), #7& D)ff&r&*-& !&#C&&*
S#$r5,-7&m$ $*/ ,*oC5f($;&5,-7&m$U W7&* C& %o for
,#$r $*/ ,*oC5f($;&U
3. W7$# $r& #7& #1+&, of /)m&*,)o*
$*/ f$-#, $r& )* DWU
4. W7$# ), #7& ()f& -1-(& of D$#$
C$r&7o",)*% +ro2&-#U
5. W7$# ), $ D$#$5mo/&(U
6. W7$# ), #7& D)ff&r&*-& !&#C&&*
To+5/oC* A++ro$-7 $*/ 4o##om5"+ A++ro$-7U
8. W7$# ), $ f$-#(&,,5f$-# T$!(&U
:. W7$# ), $ -o*f)rm&/5/)m&*,)o*U
<. W7$# ), $ 2"*;5/)m&*,)o*U
10. W7$# ), $ -(&$*,)*%U
11. T&(( m& $!o"# 1o"r -"rr&*# +ro2&-#U
Page 126 of 243
12. W7$# ), 1o"r ro(& or 2o! +rof)(& )* #7&
+ro2&-#U
13. W7$# ), 1o"r 3o! +rof)(&U
14. W7$# ), /)m&,)o* $*/ f$-#U
15. W7$# $r& #1+&, of /)m&*,)o*,U
16. W7$# $r& -o*f)rm&/ /)m&*,)o*,U
18. W7$# $r& %&*&r$#&/ /)m&*,)o*,U
1:. W7$# $r& ,(oC(1 -7$*%)*% /)m&*,)o*,U
1<. HoC m$*1 /$#$ m$r#, )* 1o"r +ro2&-#U
20. W7$# ), /$#$ m$r# *$m& )* 1o"r
+ro2&-#U
21. W7$# ), #7& ,)E& of 1o"r /$#$ m$r#U
22. W7$# ), f$-#(&,, f$-# #$!(&U G)0&
&?$m+(&.
23. HoC m$*1 f$-# #$!(&, $r& ",&/ )* #7&
+ro2&-#U
24. W7$# ), 1o"r f$-# #$!(& *$m& )* 1o"r
+ro2&-#U
25. HoC m$*1 /)m&*,)o* #$!(&, ",&/ )*
#7& +ro2&-#U
26. W7$# $r& #7& *$m&, of #7& /)m&*,)o*
#$!(&,U
28. W7$# ), S-7&m$U T1+&,U E?+($)* S#$r5
S-7&m$ $*/ S*oCf($;& S-7&m$ C)#7 /)ff&r&*-&. W7)-7 ,-7&m$
1o" ",&/ )* 1o"r +ro2&-#U W71U
2:. W71 ,#$r5,-7&m$ -$((&/ $, ,#$r5
,-7&m$U G)0& &?$m+(&.
2<. HoC fr&9"&*#(1 $*/ from C7&r& 1o"
%&# #7& /$#$ $, ,o"r-&U
30. W7$# ), /)ff&r&*-& !&#C&&* /$#$ m$r#
$*/ /$#$ C$r&7o",&U
31. W7$# ), -om+o,)#& ;&1U
32. W7$# ), ,"rro%$#& ;&1U W7&* 1o" C)((
%o for )#U
33. W7$# ), /)m&*,)o*$( mo/&()*%U
34. W7$# $r& S'D $*/ SGTU D)ff&r&*-&
!&#C&&* #7&mU E?$m+(& of SGT from 1o"r +ro2&-#.
35. HoC /o 1o" r$#& 1o"r,&(f )* /$#$
C$r&7o",&U
36. W7$# ), #7& ,#$#", of 1o"r -"rr&*#
+ro2&-#U
38. W7$# ), /$#$ C$r&7o",&U
3:. W7$# ), RS#$r5S-7&m$GU
3<. W7$# ), RS*oCf($;&5S-7&m$GU
40. W7$# ), /)ff&r&*-& !&#C&&* S#$r5
S-7&m$ $*/ S*oCf($;&5S-7&m$U
41. W7$# ), m&$* !1 ,"rro%$#& ;&1U
42. W7$# ), R'o*form&/ D)m&*,)o*GU
43. W7$# ), F$-#(&,, F$-# T$!(&U
44. W7&* C)(( C& ",& -o**&-#&/ $*/
"*-o**&-#&/ (oo;"+U
Page 127 of 243
45. W7)-7 -$-7& ,"++or#, -o**&-#&/ $*/
"*-o**&-#&/ (oo;"+U
46. W7$# ), #7& /)ff&r&*-& !&#C&&* S'D
T1+&2 $*/ S'D T1+&3U
48. Dr$C #7& ET Ar-7)#&-#"r&U
4:. Dr$C #7& DWH Ar-7)#&-#"r&U
DWH FAQ:
Conformed dimension:
A /)m&*,)o* #$!(& -o**&-#, #o mor& #7$* o*& f$-#
#$!(&. W& +r&,&*# #7), ,$m& /)m&*,)o* #$!(& )* !o#7
,-7&m&, $*/ C& r&f&r #o /)m&*,)o* #$!(& $, -o*form&/
/)m&*,)o*.
Conformed fact:
D&f)*)#)o*, of m&$,"r&m&*#, If$-#,B $r& 7)%7(1
-o*,),#&*# C& -$(( #7&m $, -o*form&/ f$-#.

1unk dimension:
I# ), -o*0&*)&*# %ro"+)*% of r$*/om f($%, $*/
$%%r&%$#&, #o %&# #7&m o"# of $ f$-# #$!(& $*/ )*#o $ ",&f"(
/)m&*,)o*$( fr$m&Cor;.
Degenerated dimension:
Page 128 of 243
U,"$((1 o--"r )* ()*& )#&m or)&*#&/ f$-# #$!(& /&,)%*,.
D&%&*&r$#& /)m&*,)o*, $r& *orm$(D &?+&-#&/ $*/ ",&f"(.
T7& /&%&*&r$#&/ /)m&*,)o* ;&1 ,7o"(/ !& #7& $-#"$(
+ro/"-#)o* or/&r of *"m!&r $*/ ,7o"(/ ,&# )* #7& f$-#
#$!(& C)#7o"# $ 2o)* #o $*1#7)*%.
Time dimension:
I# -o*#$)*, $ *"m!&r of ",&f"( $##r)!"#&, for /&,-r)!)*%
-$(&*/$r, $*/ *$0)%$#)*%.
A* &?-(",)0& #)m& /)m&*,)o* ), r&9")r&/ !&-$",& #7&
SQ /$#& ,&m$*#)-, $*/ f"*-#)o*, -$**o# %&*&r$#& ,&0&r$(
)m+or#$*# f&$#"r&,D $##r)!"#&, r&9")r&/ for $*$(1#)-$(
+"r+o,&,.
A##r)!"#&, ();& C&&; /$1,D C&&; &*/,D 7o()/$1,D
+71,)-$( +&r)o/, -$**o# !& %&*&r$#&/ !1 SQ ,#$#&m&*#,.
Fact less fact table:
F$-# #$!(& C7)-7 /o *o# 7$0& $*1 f$-#, $r& -$((&/ f$-#
(&,, f$-# #$!(&.
T7&1 m$1 -o*,),# of ;&1,P #7&,& #Co ;)*/, of f$-#
#$!(&, /o *o# 7$0& $*1 f$-#, $# $((.
T7& f)r,# #1+& of f$-# (&,, f$-# #$!(& r&-or/, $* R&0&*#G.
.$*1 &0&*# #r$-;)*% #$!(&, )* /)m&*,)o*$( /$#$
C$r&7o",&, #"r* o"# #o !& f$-#(&,,.
Ex: A ,#"/&*# #r$-;)*% ,1,#&m #7$# /&#$)(, &$-7 R,#"/&*#
$##&*/$*-&G &0&*# &$-7 /$1.
T7& ,&-o*/ #1+& of f$-# (&,, f$-# #$!(& ), -o0&r$%&. T7&
-o0&r$%& #$!(&, $r& fr&9"&*#(1 *&&/&/ C7&* $ +r)m$r1 f$-#
#$!(& )* /)m&*,)o*$( DWH ), ,+$r,&.
Ex: T7& ,$(&, f$-# #$!(& #7$# r&-or/, #7& ,$(&, of +ro/"-#,
)* ,#or&, o* +$r#)-"($r /$1, "*/&r &$-7 +romo#)o*
-o*/)#)o*
Types of facts:
Additive: f$-#, )*0o(0&/ )* #7& -$(-"($#)o*, for
/&r)0)*% ,"mm$r)E&/ /$#$.
Semi additive: f$-#, #7$# )*0o(0&/ )* #7& -$(-"($#)o*,
$# $ +$r#)-"($r -o*#&?# of #)m&.
Non additive: f$-#, #7$# -$**o# )*0o(0&/ )* #7&
-$(-"($#)o*, $# &0&r1 +o)*# of #)m&.
DATASTAGE ROUTINES
BL:
Page 129 of 243
BOT v2.3.0 Returns BLANK if passed value is NOT
NULL or BLANK, after trimming spaces
DataIn = "":Trim(Arg1)
If IsNull(DataIn) or DataIn = "" Then
Ans = ""
End Else
Ans = DataIn
End
CheckFileRecords:
Function CheckFileRecords(Arg1,Arg2)
vParamFile = Arg1 : "/" : Arg2
vCountVal = 0
OpenSeq vParamFile To FileVar Else
Call DSLogWarn("Cannot open ":vParamFile ,
"Cannot Open ParamFile")
End
Loop

ReadSeq Dummy From FileVar Else Exit ;* at
end-of-file
vCountVal = vCountVal + 1
Repeat
CloseSeq FileVar
Ans=vCountVal
Return (vCountVal)
CheckFileSizes:
DIR =
"/interface/dashboard/dashbd_dev_dk_int/Source/"
FNAME = "GLEISND_OC_02_20040607_12455700.csv"
*CMD = "ll -tr ":DIR:"|grep ":FNAME
CMD = "cmp -s ":DIR:"|grep ":FNAME
Call DSExecute("UNIX", CMD, Output,
SystemReturnCode)
Ans = Output
CheckIdocsSent:
Page 130 of 243
Checks If Idoc delivery job actually sent any Idocs to SAP.
This routine will atempt to read the DataStage Director
log for the job name specified as an argument.
If the job has a fatal error with "No link file", the routine
will copy the IDOC link file(s) into the interface error
folder.
In case the fatal error above is not found the routine
aborts the job.
A simple log of which runs produce error link file is
maintained in the module's log directory.
$INCLUDE DSINCLUDE JOBCONTROL.H
vRoutineName = "CheckIdocsSent"
Ans = "Ok"
If System(91) Then
OsType = 'NT'
OsDelim = '\'
NonOsDelim = '/'
Move = 'move '
End Else
OsType = 'UNIX'
OsDelim = '/'
NonOsDelim = '\'
Move = 'mv -f '
End
vJobHandle = DSAttachJob(JobName,
DSJ.ERRFATAL)
vLastRunStart = DSGetJobInfo(vJobHandle,
DSJ.JOBSTARTTIMESTAMP)
vLastRunEnd = DSGetJobInfo(vJobHandle,
DSJ.JOBLASTTIMESTAMP)
* Get the delivery log for the last run
vLogSummary = DSGetLogSummary ( vJobHandle,
DSJ.LOGANY, vLastRunStart, vLastRunEnd, 500)
vLogSummary = Change(vLogSummary,@FM,'')
* Manipulate vLogSummary within routine to return
status
PosOfStr =
Index(Downcase(vLogSummary),"sent",1)
vLogMsg = vLogSummary[PosOfStr,20]
* Now work out Status
If PosOfStr = 0 then
Status = 'NOT SENT'
vLogMsg = ''
Page 131 of 243
end else
Status = 'SENT'
vLogMsg = vLogSummary[PosOfStr,20]
end
Ans = Status
vErr = DSDetachJob(vJobHandle)
Call DSLogInfo("Job " : JobName : "
Detached" , vRoutineName)
***** Make a log entry to keep track of how often
the pack doesn't work ********
vMessageToWrite = Fmt(Module_Run_Parm, "12'
'L") : Fmt(Status, "10' 'L") : " - " : vLogMsg
vIdocLogFilePath =
Interface_Root_Path_Parm: OsDelim : "logs" :
OsDelim : "IdocSentLog.log"
******** Open the log file
OPENSEQ vIdocLogFilePath TO vIdocLogFile
Then
Call DSLogInfo("IdocSentLog Open" ,
vRoutineName)
** Label to return to if file is created
FileCreated:
*** Write the log entry
vIsLastRecord = @Null
Loop Until vIsLastRecord Do
READSEQ vRecord From vIdocLogFile
Then
*Call DSLogInfo("Record Read - " :
vRecord , vRoutineName)
End Else
*Call DSLogInfo("End of file
reached " , vRoutineName)
vIsLastRecord = @True
End
Repeat
WRITESEQ vMessageToWrite To vIdocLogFile
Then
Call DSLogInfo("Log entry created : "
: vMessageToWrite, vRoutineName)
End Else
Call DSLogFatal("Cannot write to " :
vIdocLogFilePath, vRoutineName)
End
End Else
Call DSLogInfo("Could not open file -
" : vIdocLogFilePath , vRoutineName)
Call DSLogInfo("Creating new file - " :
vIdocLogFilePath , vRoutineName)
Page 132 of 243
CREATE vIdocLogFile ELSE Call
DSLogFatal("Could not create file - " :
vIdocLogFilePath , vRoutineName)
WEOFSEQ vIdocLogFile
WRITESEQ Fmt("Module Run", "12' 'L") :
Fmt("Status", "10' 'L") : " " : "Message" To
vIdocLogFile Else ABORT
Call DSLogInfo("Log file created : " :
vIdocLogFilePath , vRoutineName)
GOTO FileCreated
End
**** Abort the delivery sequence and write error
message to the log. ************
If Status = 'NOT SENT' Then
Call DSLogInfo("No Idocs were actually
sent to SAP - Trying to clean up IDOC Link Files:
", vRoutineName)
vIdocSrcLinkPath =
Field(Interface_Root_Path_Parm, OsDelim, 1, 4) :
OsDelim : "dsproject" : OsDelim :
Field(Interface_Root_Path_Parm, OsDelim, 4, 1)
vIdocTgtLinkPath =
Interface_Root_Path_Parm: OsDelim : "error"
OsCmd = Move : " " : vIdocSrcLinkPath :
OsDelim : JobName : ".*.lnk " :
vIdocTgtLinkPath : OsDelim
Call DSExecute(OsType, OsCmd, OsOutput,
OsStatus)
If OsStatus <> 0 Then
Call DSLogWarn("Error when trying to
move link file(s)", vRoutineName)
LogMessMoveFail = 'The move command
(':OsCmd:') returned status
':OsStatus:':':@FM:OsOutput
Call DSLogWarn(LogMessMoveFail,
vRoutineName)
Call DSLogFatal("Cleaning up of IDOC
Link Files failed", vRoutineName)
End
Else
LogMessMoveOK = "Link files were
moved to " : vIdocTgtLinkPath
Call DSLogInfo(LogMessMoveOK,
vRoutineName)
LogMessRetry = "Job " : JobName : "
is ready to be relaunched."
Call DSLogInfo(LogMessRetry,
vRoutineName)
End
End Else
Call DSLogInfo("Delivery job log
indicates run OK ", vRoutineName)
End
ClearMappingTable:
Page 133 of 243
SUBROUTINE ClearMappingTable
(Clear_Mapping_Table, Errorcode)
Error Code = 0 ;* set this to non-zero to
stop the stage/job
**If Clear_Mapping_Table_Parm = 'Y' Then
EXECUTE "CLEARFILE Vendor_Map_HF.GEN"
**End Else
**End
ComaDotRmv:
DataIn = "":(Arg1)
If IsNull(DataIn) or DataIn = "" Then
Ans = ""
End Else
DataIn = Ereplace(DataIn, ".", "")
DataIn = Ereplace(DataIn, ",", "")
Ans = DataIn
End
CopyFiles:
Move files from one directory to another
Function
CopyofFiles(sourceDir,SourceFileMask,TargetDir,Ta
rgetFileMask,Flags)
RoutineName = "CopyFiles"
If SourceDir = '' Then SourceDir = '.'
If TargetDir = '' Then TargetDir = '.'
If SourceFileMask = '' Or SourceDir =
TargetDir Then Return(0)
! If SourceDir # '.' Then
! OpenPath SourceDir To Fv Else
! Call
DSU.DSMkDir(MkStatus,SourceDir,'','777')
! End
! End
! If TargetDir # '.' Then
! OpenPath TargetDir To Fv Else
! Call
DSU.DSMkDir(MkStatus,TargetDir,'','777')
! End
! End
If System(91) Then
OsType = 'NT'
Page 134 of 243
OsDelim = '\'
NonOsDelim = '/'
Copy = 'copy '
Flag = Flags
End Else
OsType = 'UNIX'
OsDelim = '/'
NonOsDelim = '\'
Copy = 'cp -f '
End
If Flags <> "" then Flag = NonOsDelim:Flags
Else Flag = ""
SourceWorkFiles =
Trims(Convert(',',@FM,SourceFileMask))
SourceFileList =
Splice(Reuse(SourceDir),OsDelim,SourceWorkFiles)
Convert NonOsDelim To OsDelim In
SourceFileList
TargetWorkFiles =
Trims(Convert(',',@FM,TargetFileMask))
TargetFileList =
Splice(Reuse(TargetDir),OsDelim,TargetWorkFiles)
Convert NonOsDelim To OsDelim In
TargetFileList
OsCmd = Copy:' ' : Flag : " "
:SourceFileList:' ':TargetFileList
Call DSLogInfo('Copying ': SourceFileList: '
to ':TargetFileList,RoutineName)
Call DSExecute(OsType,OsCmd,OsOutput,OsStatus)
If OsStatus Then
Call DSLogWarn('The Copy command
(':OsCmd:') returned status
':OsStatus:':':@FM:OsOutput, RoutineName)
End Else
Call DSLogInfo('Files
moved...','DSMoveFiles')
End
Ans = OsStatus
CopyofComareROWS:
Function
copyofcompareRows(Column_Name,Column_Value)
$INCLUDE DSINCLUDE JOBCONTROL.H
vJobName=DSGetJobInfo(DSJ.ME, DSJ.JOBNAME)
vStageName=DSGetStageInfo(DSJ.ME, DSJ.ME,
DSJ.STAGENAME)

Page 135 of 243
vCommonName=CheckSum(vJobName) :
CheckSum(vStageName) : CheckSum(Column_Name)
Common /vCommonName/ LastValue
vLastValue=LastValue
vNewValue=Column_Value
If vNewValue<>vLastValue Then Ans=1 Else
Ans=0
LastValue=vNewValue
CopyOfZSTPKeyLookup
Check if key passed exists in file passed
Arg1: Hash file to look in
Arg2: Key to look for
Arg3: Number of file to use "1" or "2"
* Routine to look to see if the key passed exists
in the file passed
* If so, then the non-key field from the file is
returned
* If not found, "***Not Found***" is returned
*
* The routine requires the UniVerse file named to
have been created previously
*
$INCLUDE DSINCLUDE JOBCONTROL.H

EQUATE RoutineName TO 'ZSTPKeyLookup'
* Call DSLogInfo("Routine started",RoutineName)
Common /ZSTPkeylookup/ Init1, SeqFile1,
Init2, SeqFile2, RetVal, msgtext
Ans = 0
If NOT(Init1) And Arg3 = "1" Then
* Not initialised. Therefore open file
Init1 = 1
Open Arg1 TO SeqFile1 Then Clearfile
SeqFile1
Else
Call DSLogInfo("Open failed
1",RoutineName)
msgtext = "Cannot open ZSTP creation
control file ":Arg1
Call DSLogFatal(msgtext,RoutineName)
Ans = -1
End
End
If NOT(Init2) And Arg3 = "2" Then
Page 136 of 243
* Not initialised. Therefore open file
Init2 = 1
Open Arg1 TO SeqFile2 Then Clearfile
SeqFile2
Else
Call DSLogInfo("Open failed
2",RoutineName)
msgtext = "Cannot open ZSTP creation
control file ":Arg1
Call DSLogFatal(msgtext,RoutineName)
Ans = -1
End
End
* Read the file to get the data for the key
passed, if not found, return "***Not Found***"
If Arg3 = "1"
Then
Read RetVal From SeqFile1, Arg2 Else
RetVal = "***Not Found***"
End
Else
Read RetVal From SeqFile2, Arg2 Else
RetVal = "***Not Found***"
End
Ans = RetVal
Create12CharTS:
Function Create12CharTS(1obName)
$INCLUDE DSINCLUDE JOBCONTROL.H
vJobHandle = DSAttachJob(JobName, DSJ.ERRFATAL)
vJobStartTime = DSGetJobInfo(vJobHandle,
DSJ.JOBSTARTTIMESTAMP)
vDate = Trim(vJobStartTime, "-","A")
vDate = Trim(vDate, ":","A")
vDate = Trim(vDate, " ", "A")
vDate = vDate[1,12]
Ans=vDate
CreateEmptyFile:
Function CreateEmptyFile(Arg1,Arg2)
*Create Empty File
vParamFile = Arg1 : "/" : Arg2
Page 137 of 243
OpenSeq vParamFile To FileVar Else
Call DSLogWarn("Cannot open ":vParamFile ,
"Cannot Open ParamFile")
End
WeofSeq FileVar
CloseSeq FileVar
Ans="1"
Datetrans:
DateVal
Function Datetrans(DateVal)
Function DeleteFiles(SourceDir,FileMask,Flags)
* Function ReverseDate(DateVal)
* Date mat be in the form of DD.MM.YY i.e.
01.10.03
* convert to YYYYMMDD SAP format

Ans = "20" : DateVal[7,2] : DateVal[4,2] :
DateVal[1,2]
DeleteFiles:
RoutineName = "DeleteFiles"
If SourceDir = '' Then SourceDir = '.'
If FileMask = '' SourceDir = '' Then Return(0)
If System(91) Then
OsType = 'NT'
OsDelim = '\'
NonOsDelim = '/'
Delete = 'del '
End Else
OsType = 'UNIX'
OsDelim = '/'
NonOsDelim = '\'
Delete = 'rm ' : Flags : ' '
End
WorkFiles = Trims(Convert(',',@FM,FileMask))
FileList =
Splice(Reuse(SourceDir),OsDelim,WorkFiles)
Convert NonOsDelim To OsDelim In FileList
OsCmd = Delete :' ' : FileList
Page 138 of 243
Call DSLogInfo('Deleting
':FileList,RoutineName)
Call DSExecute(OsType,OsCmd,OsOutput,OsStatus)
If OsStatus Then
Residx= Index(OsOutput,"non-existent",1)
if Index(OsOutput,"non-existent",1) = 0
then
Call DSLogInfo('The Delete command
(':Residx:OsCmd:') returned status
':OsStatus:':':@FM:OsOutput,RoutineName)
End
Else
Call DSLogInfo('No Files matched Wild
Card - Delete was not required...',RoutineName)
OsStatus = 0
End
End Else
Call DSLogInfo('Files
deleted...',RoutineName)
End
Ans = OsStatus
DisconnectNetworkDrive:
Map a Network Drive on a Windows Server:
Function Disconnectnetworkdrive(Drive_Letter)
RoutineName = "MapNetworkDrive"
If Drive_Letter = '' Then Return(0)
OsType = 'NT'
OsDelim = '\'
NonOsDelim = '/'
Copy = 'copy '
OsCmd = 'net use ' : Drive_Letter : ":
/delete"
Call DSLogInfo('Disconnecting Network Drive: '
: OsCmd,RoutineName)

Call DSExecute(OsType,OsCmd,OsOutput,OsStatus)

If OsStatus Then
Call DSLogWarn('The Copy command
(':OsCmd:') returned status
':OsStatus:':':@FM:OsOutput, RoutineName)
End Else
Call DSLogInfo('Drive: ' : Drive_Letter :
'Disconnected ',RoutineName)
End
Page 139 of 243
Ans = OsStatus
DosCmd:
Move files from one directory to another:
Function DosCmd(Cmd)
RoutineName = "DosCmd"
If System(91) Then
OsType = 'NT'
OsDelim = '\'
NonOsDelim = '/'
End Else
OsType = 'UNIX'
OsDelim = '/'
NonOsDelim = '\'
End
OsCmd = Cmd
Call DSLogInfo("CMD = " : Cmd,RoutineName)
Call DSExecute(OsType,OsCmd,OsOutput,OsStatus)
If OsStatus Then
Call DSLogWarn('The command (':OsCmd:')
returned status ':OsStatus:':':@FM:OsOutput,
RoutineName)
End Else
Call DSLogInfo('The command (':OsCmd:') was
successfull
':OsStatus:':':@FM:OsOutput,RoutineName)
End
Ans = OsStatus : " - " : OsOutput
DSMoveFiles:
Move files from one directory to another:
f SourceDir = '' Then SourceDir = '.'
If TargetDir = '' Then TargetDir = '.'
If FileMask = '' Or SourceDir = TargetDir Then
Return(0)
If System(91) Then
OsType = 'NT'
OsDelim = '\'
NonOsDelim = '/'
Move = 'move '
End Else
OsType = 'UNIX'
OsDelim = '/'
NonOsDelim = '\'
Move = 'mv -f '
End
Page 140 of 243
WorkFiles = Trims(Convert(',',@FM,FileMask))
FileList =
Splice(Reuse(SourceDir),OsDelim,WorkFiles)
Convert NonOsDelim To OsDelim In FileList
OsCmd = Move:' ' : FileList: ' ':TargetDir
Call DSLogInfo('Moving ':FileList: ' to
':TargetDir,'DSMoveFiles')
Call DSExecute(OsType,OsCmd,OsOutput,OsStatus)
If OsStatus Then
Call DSLogInfo('The move command
(':OsCmd:') returned status
':OsStatus:':':@FM:OsOutput,'DSMoveFiles')
End Else
Call DSLogInfo('Files
moved...','DSMoveFiles')
End
Ans = OsStatus
Routine Name:ErrorMgmtDummy:
Value: The Value to Be Mapped
FieldName: The Name of the source field that the Value is
contained in
Format: T(e name of t(e 'as( file containing t(e mapping
data
Default: The Default value to return if value is not found
Msg: ny text you want to store against an error
SeverityInd: The Error Severity Indicator: I-Information,
W-Warning, E-Error, F-Fatal
ErrorLogInd: An Indicator to indicate of errors should be
logged (Note this is not yet implemented)
HashFileLocation: A Hashfile could be either local to the
Module or Generic. Enter "G" for Generic "L" for Local
* FUNCTION
Map(Value,FieldName,Format,Default,Msg,ErrorLogIn
d)
*
* Executes a lookup against a hashed file using a
key
*
* Input Parameters : Arg1: Value =
The Value to be Mapped or checked
* Arg2: FieldName =
The Name of the field that is either the Target
of the Derivation or the sourceField that value
is contained in
* Arg3: Format =
The name of the Hash file containing the mapping
data
Page 141 of 243
* Arg4: Default =
The Default value to return if value is not found
* Arg5: Msg =
Any text you want stored against an error
* Arg6: SeverityInd =
An Indicator to the servity Level
* Arg7: ErrorLogInd =
An Indicator to indicate if errors should be
logged
* Arg8: HashfileLocation =
An Indicator to indicate of errors should be
logged (Note this is not yet implemented)
*
* Return Values: If the Value is not found,
return value is: -1. or the Default value if that
is supplied
* If Format Table not found,
return value is: -2
*
*
*
RoutineName = 'Map'
Common /HashLookup/ FileHandles(100),
FilesOpened
Common /TicketCommon/ Ticket_Group,
Ticket_Sequence, Set_Key, Mod_Root_Path,
Generic_Root_Path, Chk_Hash_File_Name,
Mod_Run_Num
DEFFUN
LogToHashFile(ModRunNum,Ticket_Group,Ticket_Seque
nce,Set_Key,Table,FieldName,Key,Error,Text,Severi
tyInd) Calling 'DSU.LogToHashFile'

If (Ans = "-1" or Ans = "-2" or UpCase(Ans)=
"BLOCKED") and ErrorLogInd = "Y" Then

Ret_Code=LogToHashFile(Mod_Run_Num,Ticket
_Group,Ticket_Sequence,Set_Key,Table,FieldName,Ch
k_Value,Ans,Msg,SeverityInd)
End
RETURN(Ans)
FileExists:
Move files from one directory to another
Function File Exits(Filename)
Routine Name = "File Exists"
File Found = @TRUE
OPENSEQ FileName TO aFile ON ERROR STOP
"Cannot open file (":FileName:")" THEN
Page 142 of 243
CLOSESEQ aFile
END ELSE
FileFound = @FALSE ;* file not found
END
Ans = FileFound
FileSize:
Returns the size of a file
Function FileSize(FileName)
RoutineName = "FileSize"
FileSize = -99
OPENSEQ FileName TO aFile ON ERROR STOP
"Cannot open file (":FileName:")" THEN
status FileInfo from aFile else stop
FileSize=Field(FileInfo,@FM,4)
* FileSize=FileInfo
CLOSESEQ aFile
END ELSE
FileSize = -999
END
Ans = FileSize
FindExtension:
FunctionFindExtesion(Arg1)
File_Name=Arg1
* Gets rid of the extension part of the filename
LengthofFileName = Len(File_Name)
Extension = Index(File_Name, ".", 1)
If Extension <> 0 Then
LengthofExtension = LengthofFileName - Extension
+ 1
File_Extension=File_Name[Extension,LengthofExtens
ion]
End Else
End
Ans = File_Extension
FindFileSuffix:
Function FindFileSuffix(Arg1)
File_Name=Arg1
* Gets rid of the extension part of the filename
Extension = Index(File_Name, ".", 1)
Page 143 of 243
If Extension <> 0 Then
MyLenRead=Index(File_Name, ".", 1) - 1
File_Name=File_Name[0,MyLenRead]
End Else
End
* Gets the timestamp. Doesn't handle the case
where there are suffix types and timestamp only
contains 5 digits without "_" inbetween
If Index(File_Name, "_", 6) = 0 Then
MyLenRead=Index(File_Name, "_", 4) + 1
MyTimestamp =
File_Name[MyLenRead,Len(File_Name)-1]
End Else
MyTimestamp =
Field(File_Name,"_",5):"_":Field(File_Name,"_",6)
End
TimestampEndPos = Index(File_Name,MyTimestamp,1)
+ Len(MyTimestamp)
MySuffix = File_Name[TimestampEndPos + 1,
Len(File_Name)]
Ans = MySuffix
FindTimeStamp:
Function FindTimeStamp(Arg1)
File_Name=Arg1
* Gets rid of the extension part of the filename
Extension = Index(File_Name, ".", 1)
If Extension <> 0 Then
MyLenRead=Index(File_Name, ".", 1) - 1
File_Name=File_Name[0,MyLenRead]
End Else
End
* Gets the timestamp. Doesn't handle the case
where there are suffix types and timestamp only
contains 5 digits without "_" inbetween
If Index(File_Name, "_", 6) = 0 Then
MyLenRead=Index(File_Name, "_", 4) + 1
Timestamp =
File_Name[MyLenRead,Len(File_Name)-1]
End Else
Timestamp =
Field(File_Name,"_",5):"_":Field(File_Name,"_",6)
End
Ans = Timestamp
formatCharge:
Function FormatCharge(Arg1)
Page 144 of 243
vCharge=Trim(Arg1, 0, "L")
vCharge=vCharge/100
vCharge=FMT(vCharge,"R2")
Ans=vCharge
formatGCharge:
Ans=1
vLength=Len(Arg1)
vMinus=If Arg1[1,1]='-' Then 1 Else 0
If Arg1='0.00' Then
Ans=Arg1
End
Else
If vMinus=1 Then
vString=Arg1[2,vLength-1]
vString='-':Trim(vString, '0','L')
End
else
vString=Trim(Arg1, '0','L')
end
Ans=vString
End
FTPFile:
Script_Path: he path to where the Unix Script file
lives
File_Path: The Value to Be Mapped
File_Name: The Name of the source field that the
Value is contained in
IP_Address: T(e name of t(e 'as( file containing t(e
mapping data
)serC%D0 T(e Default value to return if value is not found
,ass3ord0 Any te=t you 3ant to store against an error
TargetC,at(0 T(e target pat( 3(ere t(e ifle is to saved on t(e
target server
* FUNCTION
FTPFile(Script_Path,File_Path,File_Name,IP_Addres
s, User_ID,Password,Target_Path)
*
*
Page 145 of 243
RoutineName = 'FTPFile'

OsCmd = Script_Path : "/ftp_put.sh":"
":File_Path:" ":File_Name:" ":IP_Address:"
":User_ID:" ":Password:" ":Target_Path :"
":Script_Path
Call DSLogInfo('Ftp ':File_Name: ' to ' :
IP_Address : ' ' :Target_Path,'FTPFile')
Call DSLogInfo('Ftp Script =
':Script_Path,'FTPFile')
Call DSExecute("UNIX",OsCmd,OsOutput,OsStatus)
If OsStatus Then
Call DSLogInfo('The FTP command (':OsCmd:')
returned status
':OsStatus:':':@FM:OsOutput,'DSMoveFiles')
End Else
Call DSLogInfo('Files FTPd...':
'(':OsCmd:')','FTPFile')
End
Ans = OsStatus
RETURN(Ans)
FTPmget:
* FUNCTION
FTPFile(Script_Path,Source_Path,File_Wild_Card,IP
_Address, User_ID,Password,Target_Path)
*
*
RoutineName = 'FTPmget'

OsCmd = Script_Path:"/ftp_Mget.sh":"
":Source_Path:" ":File_Wild_Card:" ":IP_Address:"
":User_ID:" ":Password:" ":Target_Path:"
":Script_Path
*OsCmd = Script_Path : "/test.sh"
Call DSLogInfo('Ftp ':File_Wild_Card: ' From '
: IP_Address : ' ' :Source_Path : ' to '
:Target_Path,RoutineName)
Call DSExecute("UNIX",OsCmd,OsOutput,OsStatus)
If OsStatus Then
Call DSLogInfo('The FTP command (':OsCmd:')
returned status
':OsStatus:':':@FM:OsOutput,'DSMoveFiles')
End Else
Page 146 of 243
Call DSLogInfo('Files FTPd...':
'(':OsCmd:')',RoutineName)
End
Ans = OsStatus
RETURN(Ans)
Concatenate All Input Arguments to Output using TAB
character Concatenate All
Routine="GBIConcatItem"
t = Char(009)
If ISNULL(IND) THEN Pattern = ""
ELSE Pattern = IND [1,1]
If ISNULL(VKORG) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : VKORG [1,4]
If ISNULL(VTWEG) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : VTWEG [1,2]
If ISNULL(SPART) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : SPART [1,2]
If ISNULL(WERKS) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : WERKS [1,4]
If ISNULL(AUART) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : AUART [1,4]
If ISNULL(FKDAT) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : FKDAT [1,8]
If ISNULL(KUNAG) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : KUNAG [1,10]
If ISNULL(KUNRE) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : KUNRE [1,10]
If ISNULL(MATNR) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : MATNR [1,18]
If ISNULL(PSTYV) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : PSTYV [1,4]
If ISNULL(KWMENG) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : KWMENG [1,15]
If ISNULL(XBLNR) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : XBLNR [1,16]
If ISNULL(VGPOS) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : VGPOS [1,6]
If ISNULL(FKARA) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : FKARA [1,4]
If ISNULL(ZOR_DT_PCODE) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : ZOR_DT_PCODE
[1,8]
If ISNULL(ZAWB) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : ZAWB [1,16]
If ISNULL(LGORT) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : LGORT [1,4]
If ISNULL(VKAUS) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : VKAUS [1,3]
If ISNULL(VKBUR) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : VKBUR [1,4]
If ISNULL(VKGRP) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : VKGRP [1,3]
Page 147 of 243
If ISNULL(ZLSCH) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : ZLSCH [1,1]
If ISNULL(ZTERM) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : ZTERM [1,4]
If ISNULL(KURSK) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : KURSK [1,9]
If ISNULL(TAXM1) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : TAXM1 [1,1]
If ISNULL(VRKME) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : VRKME [1,3]
If ISNULL(ARKTX) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : ARKTX [1,40]
If ISNULL(KTGRM) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : KTGRM [1,2]
If ISNULL(ZZTAXCD) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : ZZTAXCD [1,2]
If ISNULL(LAND2) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : LAND2 [1,3]
If ISNULL(NAME1) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : NAME1 [1,35]
If ISNULL(PSTLZ) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : PSTLZ[1,10]
If ISNULL(ORT01) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : ORT01 [1,35]
If ISNULL(KOSTL) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : KOSTL[1,10]
If ISNULL(WAERS) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : WAERS [1,5]
If ISNULL(KUNRG) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : KUNRG [1,10]
If ISNULL(KUNWE) THEN Pattern = Pattern :
t ELSE Pattern = Pattern : t : KUNWE [1,10]
Ans = Pattern
GBIConcatItem:
Concatenate All Input Arguments to Output using TAB
character:
Routine="GBIConcatItem"
t = Char(009)
If ISNULL(IND) THEN Pattern = ""
ELSE Pattern = IND [1,1]
If ISNULL(KNUMV) THEN Pattern = Pattern : t
ELSE Pattern = Pattern : t : KNUMV [1,16]
If ISNULL(KPOSN) THEN Pattern = Pattern : t
ELSE Pattern = Pattern : t : KPOSN [1,6]
If ISNULL(KSCHL) THEN Pattern = Pattern : t
ELSE Pattern = Pattern : t : KSCHL [1,4]
If ISNULL(KBETR) THEN Pattern = Pattern : t
ELSE Pattern = Pattern : t : KBETR [1,11]
If ISNULL(KWERT) THEN Pattern = Pattern : t
ELSE Pattern = Pattern : t : KWERT [1,13]
If ISNULL(WAERS) THEN Pattern = Pattern : t
ELSE Pattern = Pattern : t : WAERS [1,5]
Page 148 of 243
If ISNULL(KAWRT) THEN Pattern = Pattern : t
ELSE Pattern = Pattern : t : KAWRT [1,15]
If ISNULL(KHERK) THEN Pattern = Pattern : t
ELSE Pattern = Pattern : t : KHERK [1,1]
Ans = Pattern
GCMFConvert:
Receive GCMF string and change known strings to
required values:
DataIn = "":Trim(Arg1)
If IsNull(DataIn) or DataIn = "" Then
Ans = ""
End Else
DataIn = Ereplace (DataIn,"$B$","")
DataIn = Ereplace (DataIn,"NULL","")
DataIn = Ereplace (DataIn,"&lt;","<")
DataIn = Ereplace (DataIn,"&gt;",">")
DataIn = Ereplace
(DataIn,"&quot;",'"')
DataIn = Ereplace
(DataIn,"&apos;","'")
DataIn = Ereplace (DataIn,"&amp","&")
DataIn = Ereplace (DataIn,"&#124","|")
Ans = DataIn
End
GCMFFormating:
*
* FUNCTION GCMFFormating(Switch, All_Row)
*
* Replaces some special characters when creating
the GCMF file
*
* Input Parameters : Arg1: Switch = Step to
change.
* Arg2: All_Row = Row
containing the GCMF Record.
*
DataIn=Trim(All_Row)
If Switch=1 Then
If IsNull(DataIn) or DataIn= "" Then
Ans = "$B$"
End
Else
DataInFmt = Ereplace (DataIn ,"&",
"&amp;")
DataInFmt = Ereplace (DataInFmt ,"'",
"&apos;")
DataInFmt = Ereplace (DataInFmt ,'"',
"&quot;")
Ans = DataInFmt
End
Page 149 of 243
End
Else
If Switch=2 Then
DataInFmt = Ereplace (DataIn ,">",
"&gt;")
DataInFmt = Ereplace (DataInFmt ,"<",
"&lt;")
Ans = DataInFmt
End
Else
* Final Replace, After the Merge of all
GCMF segments
DataInFmt = Ereplace (DataIn ,"|",
"&#124")
Ans = DataInFmt
End
End
GeneralCounter:
COMMON /Counter/ OldParam, TotCount
NextId = Identifier
IF UNASSIGNED(OldParam) Then
OldParam = NextId
TotCount = 0
END
IF NextId = OldParam THEN
TotCount += 1
END ELSE
OldParam = NextId
TotCount = 1
END
Ans = TotCount
GetNextCustomerNumber:
Sequence number generator.
Routine to get the next sequence number to use for a
customer from a file, and save the usde value in the file.
The routine argument is the name associated with the
super group that the customer is being created in.
The routine uses a file to store the next available number.
It reads the number, then increments and stores the value
in common, writing the next value back to file each time.
Page 150 of 243
* Routine to generate the next customer number.
The argument is a string used to
* identify the super group for the customer.
*
* The routine uses a UniVerse file to store the
next number to use. This
* value is stored in a record named after the
supplied argument. The
* routine reads the number, then increments and
stores the value
* in common storage, writing the next value back
to file each time.
*
* Declare shared memory storage.
Common /CustSequences/ Initialized, NextVal,
SeqFile
EQUATE RoutineName TO 'GetNextCustomerNumber'
If NOT(Initialized) Then
* Not initialised. Attempt to open the
file.
Initialized = 1
Open "IOC01_SUPER_GRP_CTL_HF" TO SeqFile
Else
Call DSLogFatal("Cannot open customer
number allocation control file",RoutineName)
Ans = -1
End
End
* Read the named record from the file.
Readu NextVal From SeqFile, Arg1 Else
Call DSLogFatal("Cannot find super group
in customer number allocation control
file",RoutineName)
Ans = -1
End
Ans = NextVal
* Increment the sequence value, and write
back to file.
NextVal = NextVal + 1
If Len(NextVal) < 10 then NextVal =
Substrings("0000000000",1,10-
Len(NextVal)):NextVal
Writeu NextVal On SeqFile, Arg1 Else
Call DSLogFatal("Update to customer number
allocation control file failed",RoutineName)
Ans = -1
End
GetNextErrorTableID:
Sequence number generator in a concurrent environment.
Routine to generate a sequential number.
Page 151 of 243
The routine argument is the name associated with the
sequence.
The routine uses a file to store the next available number.
It reads the number from the file on each invocation; a
lock on the file prevents concurrent access.
* Routine to generate a sequential number. The
argument is a string used to
* identify the sequence.
*
* NOTE: This routine uses locking to allow
multiple processes to access the
* same sequence.
*
* The routine uses a UniVerse file to store the
next number to use. This
* value is stored in a record named after the
supplied argument. The
* routine always attempts to read the number from
the file, so that the
* record for the sequence becomes locked. It
increments and stores the
* value in common storage, writing the next value
back to file each
* time. Writing back this value frees the lock.
*
* Declare shared memory storage.
Common /ErrorTableSequences/ Initialized,
NextVal, SeqFile

EQUATE RoutineName TO 'GetNextErrorTableID'
If NOT(Initialized) Then
* Not initialised. Attempt to open the
file.
Initialized = 1
Open "ErrorTableSequences" TO SeqFile Else
* Open failed. Create the sequence
file.
EXECUTE "CREATE.FILE
ErrorTableSequences 2 1 1"
Open "ErrorTableSequences" TO SeqFile
Else Ans = -1
End
End
* Read the named record from the file.
* This obtains the lock (waiting if
necessary).
Readu NextVal From SeqFile, Table_Name Else
NextVal = 1
End
Ans = NextVal
NextVal = NextVal + 1
Page 152 of 243
* Increment the sequence value, and write
back to file.
* This releases the lock.
Write NextVal On SeqFile, Table_Name Else Ans
= -1
GetNextModSeqNo:
Gets the Next Mod Run Code from an Initialised
Sequence
This routine gets the next Mod Run Number in a
squenced that was initialised,.
The arguments are Mod_Code_Parm and
Supplier_ID_Parm which combined form the key for this
instance of a sequence
GetParameterArray:
* GetParameterArray(Arg1)
* Decription: Get parameters
* Written by:
* Notes:
* Bag of Tricks Version 2.3.0 Release Date 2001-
10-01
* Arg1 = Path and Name of Parameter File
*
* Result = ( <1> = Parameter names, <2> =
Parameter values)
*
-------------------------------------------------
-----------
DEFFUN FileFound(A) Calling 'DSU.FileFound'
cBlank = ''
cName = 1
cValue = 2
vParamFile = Arg1
aParam = cBlank
vParamCnt = 0
vCurRoutineName = 'Routine:
GetParameterArray'
vFailed = @FALSE
Done = @FALSE
IF vParamFile AND FileFound(vParamFile)
Then
OPENSEQ vParamFile TO hParamFile Then
Loop
READSEQ vLineRaw FROM hParamFile
ON ERROR
Page 153 of 243
Call DSLogWarn('Error from
':vParamFile:'; Status =
':STATUS(),vCurRoutineName)
CLOSE hParamFile
vFailed = @TRUE
Done = @TRUE
End Then
vLine = TRIM(vLineRaw)
vFirstChar = LEFT(vLine,1)
vRemark = LEFT(vLine,4)
IF NOT(vFirstChar = cBlank OR
vFirstChar = '#' OR vFirstChar = '*' OR
vFirstChar = '"' OR vFirstChar = "'" OR
vFirstChar = ';' OR vFirstChar = ':' OR
vFirstChar = '[' OR vRemark = 'REM ') THEN
vParamCnt += 1 ; * Add
to any parameter array passed as an argument
aParam<1,vParamCnt> =
TRIM(FIELD(vLine,'=',cName))
aParam<2,vParamCnt> =
FIELD(vLine,'=',cValue)
END
END ELSE
Done = @TRUE
END
Until Done Do Repeat
CLOSE hParamFile
End Else
Call DSLogWarn('Error from
':vParamFile:'; Status =
':STATUS(),vCurRoutineName)
vFailed = @TRUE
End
End Else
vFailed = @TRUE
End
Call DSLogInfo("Values loaded from file:
":vParamFile:@AM:aParam, vCurRoutineName)
If vFailed Then
Ans = "ERROR"
End Else
Ans = aParam
End
LastDayofMonth:
Returns the Last Day of the Month
Deffun DSRMessage(A1,A2) Calling
"*DataStage*DSR_MESSAGE"
Equate TransformName To "ConvertMonth"
* Check the format of the input value.
If IsNull(Arg1) or (Len(Arg1) < 6) Then

Ans = ""
GoTo ExitLastDayMonth
Page 154 of 243
End
InYear = Substrings(Arg1,1,4)
InMonth = Substrings(Arg1,5,2)
If InMonth < 1 Or InMonth > 12 Then
Ans = ""
GoTo ExitLastDayMonth
End

* Generate the required output, depending on the
Action argument.
Begin Case
Case InMonth = "1"
* Internal date for first day of month.
OutDt ="31"
Case InMonth = "2"
* Internal date for first day of month.
if mod(Num(InYear),4)<>0 then
OutDt = "28"
end
if mod(Num(InYear),4)=0 then
OutDt = "29"
end

Case InMonth = "3"
* Internal date for first day of month.
OutDt = "31"
Case InMonth = "4"
* Internal date for first day of month.
OutDt = "30"
Case InMonth = "5"
* Internal date for first day of month.
OutDt ="31"
Case InMonth = "6"
* Internal date for first day of month.
OutDt ="30"
Case InMonth = "7"
* Internal date for first day of month.
OutDt ="31"
Case InMonth = "8"
* Internal date for first day of month.
OutDt ="31"
Case InMonth = "9"
* Internal date for first day of month.
OutDt ="30"
Case InMonth = "10"
* Internal date for first day of month.
OutDt ="30"
Case InMonth = "11"
Page 155 of 243
* Internal date for first day of month.
OutDt ="31"
Case InMonth = "12"
* Internal date for first day of month.
OutDt ="31"

End Case
Ans=OutDt:"-":InMonth:"-":InYear
ExitLastDayMonth:
LogToErrorFile:
Logs errors to an error hashed file
* FUNCTION
LogToErrorFile(Table,Field_Name,Check_Value,Error
_Number,Error_Text_1, Error_Text_2,
Error_Text_3,Additional_Message)
*
*
* Places the current Writes Error Messages to a
Hash File
*
* Input Parameters : Arg1: Table
= The name of Control table being checked
* Arg2: Field_Name
= The name of the Field that is in error
* Arg3: Check_Value
= The value used to look up in the Hash file to
get try and get a look up match
* Arg4: Error_Number
= The error number returned
* Arg5: Error_Text_1
= First error message argument. Used to build the
default error message
* Arg6: Error_Text_2
= Second error message argument. Used to build
the default error message
* Arg7: Error_Text_3
= Thrid error message argument. Used to build the
default error message
* Arg8: Additional_Message
= Any text that could be stored against an error
*
RoutineName = "LogToErrorFile"

Common /HashLookup/ FileHandles(100),
FilesOpened
Common /TicketErrorCommon/ ModRunID,
TicketFileID, TicketSequence, TicketSetKey,
JobStageName, ModRootPath
$INCLUDE DSINCLUDE JOBCONTROL.H
Page 156 of 243
Ans = "ERROR"
If System(91) Then
OsType = 'NT'
OsDelim = '\'
NonOsDelim = '/'
Move = 'move '
End Else
OsType = 'UNIX'
OsDelim = '/'
NonOsDelim = '\'
Move = 'mv -f '
End
JobName = DSGetJobInfo (DSJ.ME , DSJ.JOBNAME)
Path = ModRootPath : OsDelim :"error" :
OsDelim
FileName = "ErrorLog_HF." : ModRunID
PathFile = Path : FileName
Call DSLogInfo(Path:"-- checking --" :
PathFile,RoutineName)
vMessage = "INLOG Error Log = " : PathFile
*Call DSLogInfo(vMessage, RoutineName )

vMessage = "INLOG Error Log Data = " :
ModRunID : "|" : TicketFileID : "|" :
TicketSequence : "|" : TicketSetKey : "|" : Table
: "|" : Field_Name : "|" : Check_Value : "|" :
Error_Number : "|" : Additional_Message
*Call DSLogInfo(vMessage, RoutineName )
Key = JobName : JobStageName : ModRunID:
TicketFileID : TicketSequence : TicketSetKey :
Table : Field_Name
Err_Rec = ""
Err_Rec <1> = JobName
Err_Rec <2> = JobStageName
Err_Rec <3> = ModRunID
Err_Rec <4> = TicketFileID
Err_Rec <5> = TicketSequence
Err_Rec <6> = TicketSetKey
Err_Rec <7> = Table
Err_Rec <8> = Field_Name
Err_Rec <9> = Check_Value
Err_Rec <10> = Error_Number
Err_Rec <11> = Error_Text_1
Err_Rec <12> = Error_Text_2
Err_Rec <13> = Error_Text_3
Err_Rec <14> = Additional_Message
* Attempt to find the table name in our
cache.
Locate FileName in FilesOpened Setting POS
Then
Page 157 of 243
Write Err_Rec To FileHandles(POS), Key Then
TAns = 0
End Else
TAns = -1
End
End Else
* Table is not in cache of opened tables,
so open it.
Openpath PathFile To FileHandles(POS)
Then
FilesOpened<-1> = FileName
Write Err_Rec To FileHandles(POS),
Key Then TAns = 0
Else
TAns = -1
End
End Else
TAns = -2
End
End
Ans = "ERROR"
Return(Ans)
LogToHashFile:
* FUNCTION
LogToHashFile(ModRunNum,TGrp,TSeg,SetKey,Table,Fi
eldNa,KeyValue,Error,Msg,SeverityInd)
*
*
* Places the current Writes Error Messages to a
Hah File
*
* Input Parameters : Arg1: ModRunNum =
The unique number allocated to a run of an Module
* Arg2: Ticket_Group =
The Ticket Group Number of the Current Row
* Arg3: Ticket_Sequence =
The Ticket Sequence Number of the Current Row
* Arg4: Set_Key = A
Key to identify a set of rows e.g. an Invoice
Number to a set of invoice lines
* Arg5: Table =
The name of Control table being checked
* Arg6: FieldNa =
The name of the Field that is in error
* Arg7: KeyValue =
The value used to look up in the Hash file to get
try and get a look up match
* Arg8: Error =
The error number returned
* Arg9: Msg =
Any text that could be stored against an error
* Arg10: SeverityInd =
An Indicator to state the error severity level
Page 158 of 243
RoutineName = "LogToHashFile"
Common /HashLookup/ FileHandles(100),
FilesOpened
Common /TicketCommon/ Ticket_Group,
Ticket_Sequence, Set_Key, Job_Stage_Name,
Mod_Root_Path, Generic_Root_Path,
Chk_Hash_File_Name, Mod_Run_Num
$INCLUDE DSINCLUDE JOBCONTROL.H
TAns = 0
If System(91) Then
OsType = 'NT'
OsDelim = '\'
NonOsDelim = '/'
Move = 'move '
End Else
OsType = 'UNIX'
OsDelim = '/'
NonOsDelim = '\'
Move = 'mv -f '
End
JobName = DSGetJobInfo (DSJ.ME , DSJ.JOBNAME)
* StageName = DSGetStageInfo (DSJ.ME,DSJ.ME,
DSJ.STAGENAME)
Path = Mod_Root_Path : OsDelim :"error" :
OsDelim
FileName = "ErrorLog_HF." : Mod_Run_Num
PathFile = Path : FileName
*Message = "INLOG Error Log = " : PathFile
*Call DSLogInfo(Message, RoutineName )

*Message = "INLOG Error Log Data = " :
ModRunNum : "|" : TGrp : "|" : TSeq : "|" :
Set_Key : "|" : Table : "|" : FieldNa : "|" :
KeyValue : "|" : Error : "|" : Msg
*Call DSLogInfo(Message, RoutineName )
Key = JobName : Job_Stage_Name : ModRunNum:
TGrp : TSeq : SetKey : Table : FieldNa
Err_Rec = ""
Err_Rec <1> = JobName
Err_Rec <2> = Job_Stage_Name
Err_Rec <3> = ModRunNum
Err_Rec <4> = TGrp
Err_Rec <5> = TSeq
Err_Rec <6> = SetKey
Err_Rec <7> = Table
Err_Rec <8> = FieldNa
Err_Rec <9> = KeyValue
Page 159 of 243
Err_Rec <10> = Error
Err_Rec <11> = Msg
Err_Rec <12> = SeverityInd
* Attempt to find the table name in our
cache.
Locate FileName in FilesOpened Setting POS
Then
Write Err_Rec To FileHandles(POS), Key Then
TAns = 0
End Else
TAns = -1
End
End Else
* Table is not in cache of opened tables,
so open it.
Openpath PathFile To FileHandles(POS)
Then
FilesOpened<-1> = FileName
Write Err_Rec To FileHandles(POS),
Key Then TAns = 0
Else
TAns = -1
End
End Else
TAns = -2
End
End
Ans = TAns
RETURN(Ans)
MandatoryFieldCheck: Check whether the field name
passed is mandatory
Routine to check to see if the passed field is populated,
and if not, to check to see if it is mandatory. If the field
contains "?", then it is handled as if it is blank.
The routine uses a control table containing process name,
field name, group name and exclusion flag to control
mandatory or not.
The routine arguments are the field name, the field, the
group key, whether this is the first mandatory check for
the record, and the process name when the first check flag
is "Y".
A variable kept in memory (Mandlist) is used to record
the mandatory check failures.
Page 160 of 243
When the passed field name is "Getmand", no processing
is performed except to return the Mandlist field.
* Routine to check whether the passed field is
filled, and if not, whether it is mandatory.
*
* The routine uses a UniVerse file
"MANDATORY_FIELD_HF" which contains the mandatory
field controls
*
* Arg1 Field name to be checked (literal)
* Arg2 Field value
* Arg3 Group name
* Arg4 1st call for record
* Arg5 The process name on the first call
(this is saved in storage for subsequent calls)
*
* Declare shared memory storage.
Common /Mandatory/ Initialized, SeqFile,
DataIn, GroupIn, GroupV, Mandlist, ProcessIn,
ProcessV
EQUATE RoutineName TO 'MandatoryFieldCheck'
* Call DSLogInfo("Routine
started":Arg1,RoutineName)
If NOT(Initialized) Then
Initialized = 1
* Call DSLogInfo("Initialisation
Started",RoutineName)
Open "MANDATORY_FIELD_HF" TO SeqFile Else
Call DSLogFatal("Cannot open Mandatory
field control file",RoutineName)
Ans = -1
End
* Call DSLogInfo("Initialisation
Complete",RoutineName)
End

If Arg4 = "Y"
Then
Mandlist = ""
ProcessIn = "":Trim(Arg5)
If IsNull(ProcessIn) or ProcessIn = ""
Then ProcessV = " "
Els
e ProcessV = ProcessIn
End

If Arg1 = "Getmand" Then Ans = Mandlist
Else
DataIn = "":Trim(Arg2)
GroupIn = "":Trim(Arg3)
Page 161 of 243
If IsNull(GroupIn) or GroupIn = "" Then
GroupV = " "
Else
GroupV = GroupIn
If IsNull(DataIn) or DataIn = "" or DataIn
= "?"
Then
*
* Field is blank - check for mandatory
*
* Call DSLogInfo(Arg1:" blank - checking
whether mandatory",RoutineName)
*
mystring = ProcessV:Arg1:GroupV:"X"
Read Retval From SeqFile, mystring
then
* Call DSLogInfo(Arg1:" Group
specifically excluded",RoutineName)
Ans = 0
end
else
mystring = ProcessV:Arg1:GroupV
Read Retval From SeqFile, mystring
then
* Call DSLogInfo(Arg1:" Group
specifically included",RoutineName)
Ans = 1
end
else
mystring = ProcessV:Arg1:"ALL"
Read Retval From SeqFile,
mystring
then
* Call DSLogInfo(Arg1:" Global
mandatory",RoutineName)
Ans = 1
end
else
* Call DSLogInfo(Arg1:" blank -
not mandatory",RoutineName)
Ans = 0
end
end
end
End
Else
Ans = 0
* Call DSLogInfo(Arg1:" Not
blank",RoutineName)
End
If Ans = 1
Then
If Mandlist = ""
Then Mandlist = Arg1
Else Mandlist = Mandlist:",":Arg1
end
End
Page 162 of 243
Map:(Routinue Name)
* FUNCTION
Map(Value,FieldName,Format,Default,Msg,ErrorLogIn
d)
*
* Executes a lookup against a hashed file using a
key
*
* Input Parameters : Arg1: Value =
The Value to Be Mapped
* Arg2: FieldName =
The Name of the field that is either the Target
of the Derivation or the sourceField that value
is contained in
* Arg3: Format =
The name of the Hash file containing the mapping
data
* Arg4: Default =
The Default value to return if value is not found
* Arg5: Msg =
Any text you want stored against an error
* Arg6: SeverityInd =
An Indicator to the servity Level
* Arg7: ErrorLogInd =
An Indicator to indicate if errors should be
logged
* Arg8: HashfileLocation =
An Indicator to indicate of errors should be
logged (Note this is not yet implemented)
*
* Return Values: If the Value is not found,
return value is: -1. or the Default value if that
is supplied
* If Format Table not found,
return value is: -2
*
*
*
RoutineName = 'Map'
Common /HashLookup/ FileHandles(100),
FilesOpened
Common /TicketCommon/ Ticket_Group,
Ticket_Sequence, Set_Key, Job_Stage_Name,
Mod_Root_Path, Generic_Root_Path,
Chk_Hash_File_Name, Mod_Run_Num
*Message = "Map Job Stage Name ==>" :
Job_Stage_Name
* Call DSLogInfo(Message, RoutineName )
*Message = "Map Mod Root Path ==>" :
Mod_Root_Path
Page 163 of 243
* Call DSLogInfo(Message, RoutineName )
*Message = "Generic Root Path ==>" :
Generic_Root_Path
* Call DSLogInfo(Message, RoutineName )
*Message = "Map Chk_Hash_File_Name ==>" :
Chk_Hash_File_Name
* Call DSLogInfo(Message, RoutineName )
*Message = "Map Mod_Run_Num ==>" : Mod_Run_Num
* Call DSLogInfo(Message, RoutineName )
DEFFUN
LogToHashFile(ModRunNum,Ticket_Group,Ticket_Seque
nce,Set_Key,Table,FieldName,Key,Error,Text,Severi
tyInd) Calling 'DSU.LogToHashFile'
*
If Len(Chk_Hash_File_Name) = 3 And
HashFileLocation = "G" Then Format_Extn =
Chk_Hash_File_Name Else Format_Extn = Mod_Run_Num
[1,5]
If System(91) Then
OsType = 'NT'
OsDelim = '\'
NonOsDelim = '/'
Move = 'move '
End Else
OsType = 'UNIX'
OsDelim = '/'
NonOsDelim = '\'
Move = 'mv -f '
End

ColumnPosition = 0
PositionReturn = 0
Table = Format
If HashFileLocation = "G" then
PathFormat = Generic_Root_Path :
OsDelim :"format" : OsDelim: Format : "_HF." :
Format_Extn
End Else
PathFormat = Mod_Root_Path :
OsDelim :"format" : OsDelim : Format : "_HF." :
Format_Extn
End

If IsNull(Value) then Chk_Value = "" Else
Chk_Value = Value
*Message = "Map PathFormat ==>" :
PathFormat
*Call DSLogInfo(Message, RoutineName )
Page 164 of 243
*Message = "Value ==>" : Value
*Call DSLogInfo(Message, RoutineName )
*Message = "Format ==>" : Format
*Call DSLogInfo(Message, RoutineName )
*Message = "Default ==>" : Default
*Call DSLogInfo(Message, RoutineName )
*Message = "ErrorLogInd ==>" : ErrorLogInd
*Call DSLogInfo(Message, RoutineName )
* Set the Default Answer for if a value is
not found
Begin Case
Case UpCase(Default) = "NODEF"
Default_Ans = "-1"

Case Default = "PASS"
NumFields = Dcount(Chk_Value, "|")
If NumFields > 1 Then
Default_Ans =
Field(Chk_Value,"|",2)
*Message = "Num Fields > 1 Default_Ans ==>"
: Default_Ans : "#" : Chk_Value
*Call DSLogInfo(Message, RoutineName )
End Else
Default_Ans = Chk_Value
*Message = "Num Fields NG 0 Default_Ans
==>" : Default_Ans : "#" : Chk_Value
*Call DSLogInfo(Message, RoutineName )
End
Case @TRUE
If UpCase(Field(Default,"|",1)) <> "BL"
Then Default_Ans = Default Else Default_Ans = -1
End Case
* Determine if we are returning one column or
entire row.
If Num(ColumnPosition) then
ColumnPosition = Int(ColumnPosition)
If ColumnPosition > 0 and ColumnPosition
< 99999 Then
PositionReturn = 1
End
End

* Attempt to find the table name in our
cache.
Locate Format in FilesOpened Setting POS Then
Page 165 of 243
Read Rec From FileHandles(POS), Chk_Value
Then
If PositionReturn Then Ans =
Rec<ColumnPosition> Else Ans = Rec
End Else
Ans = Default_Ans
End
End Else
* Table is not in cache of opened tables,
so open it.
Openpath PathFormat To FileHandles(POS)
Then
FilesOpened<-1> = Format
Read Rec From FileHandles(POS),
Chk_Value Else
Rec = Default_Ans
End
If PositionReturn And Rec <>
Default_Ans Then
Ans = Rec<ColumnPosition>
End Else
Ans = Rec
End
End Else
Ans = "-2"
End
End

If UpCase(Field(Default,"|",1)) = "BL" and
Ans <> -2 Then
If Chk_Value = "" then
Ans = Field(Default,"|",2)
End
End
*Message = "Outside LOGGING" :
Mod_Run_Num: "|" : Ticket_Group : "|" :
Ticket_Sequence "|" : Set_Key : "|" : Table : "|"
: FieldName : "|" : Chk_Value : "|" : Msg
*Call DSLogInfo(Message, RoutineName )
*Message = "OUTSIDE PASS Trans
Default_Ans ==>" : Default_Ans : " Ans ==> " :
Ans
*Call DSLogInfo(Message, RoutineName )

LogPass = "N"
If (Default = "PASS" and Default_Ans <> Ans)
then LogPass = "Y"
If LogPass = "Y"
Then
*Message = "PASS Trans Default_Ans
==>" : Default_Ans : " Ans ==> " : Ans
*Call DSLogInfo(Message, RoutineName )
End
Page 166 of 243
If (Ans = "-1" or Ans = "-2" or UpCase(Ans)=
"BLOCKED" or LogPass = "Y" or SeverityInd = "I")
and ErrorLogInd = "Y" Then


*Message = "Write to Log Ans==> " :
Ans : " ErrorInd==> " : ErrorLogInd

*Message = "LOGGING" : Mod_Run_Num: "|" :
Ticket_Group : "|" : Ticket_Sequence : "|" :
Table : "|" : FieldName : "|" : Chk_Value : "|" :
Ans
*Call DSLogInfo(Message, RoutineName )
Ret_Code=LogToHashFile(Mod_Run_Num,Ticket
_Group,Ticket_Sequence,Set_Key,Table,FieldName,Ch
k_Value,Ans,Msg,SeverityInd)
End
RETURN(Ans)
Output1obStats: Outputs the job link statistics
$INCLUDE DSINCLUDE JOBCONTROL.H
hJob = DSAttachJob(JobName, DSJ.ERRFATAL)

Start_TS = DSGetJobInfo (hJob,
DSJ.JOBSTARTTIMESTAMP)
End_TS = DSGetJobInfo
(hJob,DSJ.JOBLASTTIMESTAMP)
Elapsed_Secs_Cnt = DSGetJobInfo
(hJob,DSJ.JOBELAPSED)
Job_Term_Status = DSGetJobInfo
(hJob,DSJ.JOBINTERIMSTATUS)
User_Status = DSGetJobInfo
(hJob,DSJ.USERSTATUS)
ErrCode = DSDetachJob(hJob)
Ans = Start_TS : "|" : End_TS : "|" :
Elapsed_Secs_Cnt : "|" : Job_Term_Status : "|" :
User_Status
Pattern:
Routine="Pattern"
Var_Len = len(Value)
Pattern = Value
For i = 1 To Var_Len
If Num(Value [i,1]) Then
Pattern [i,1] = "n"
Page 167 of 243
end
Else
If Alpha(Value [i,1]) Then
Pattern[i,1] = "a"
end
Else
Pattern[i,1] = Value [i,1]
end
end
Next i
Ans = Pattern
Checks a passed field to see if it matches the
pattern which is also passed.:
The input field is checked to see if it conforms
to the format that is also passed as a second
parameter.
The result of the routine is True is the pattern
matches the required format, and false if it does
not.
If the second parameter is empty, then true is
returned.
Equate TransformName To "PatternMatchCheck"
Begin Case
Case Arg2 = "" ;* No pattern - so return
true
Ans = 1
Case Arg3 = "" ;* Only 1 pattern passed
Ans = Arg1 Matches Arg2
Case 1 ;* All other cases
Ans = Arg1 Matches Arg2 : CHAR(253) :
Arg3
End Case
Prepare1ob:
$INCLUDE DSINCLUDE JOBCONTROL.H
Job_Handle = DSAttachJob (Job_Name, DSJ.ERRWARN)
ErrCode1=DSPrepareJob(Job_Handle)
ErrCode2 = DSDetachJob(Job_Handle)
Ans= ErrCode2
RangeCheck:
* FUNCTION
Map(Value,FieldName,Format,Default,Msg,ErrorLogIn
d)
Page 168 of 243
*
* Executes a lookup against a hashed file using a
key
*
* Input Parameters : Arg1: Value =
The Value to be checked
* Arg2: MinValue =
The Min Value allowed
* Arg3: MaxValue =
The Max Value allowed
* Arg4: FieldName =
The Name of the Source field being checked
* Arg5: Msg =
Any text you want stored against an error
* Arg6: SeverityInd =
An Indicator to the servity Level
* Arg7: ErrorLogInd =
An Indicator to indicate if errors should be
logged
*
* Return Values: If the Value is not found,
return value is -1. else the value supplied is
returned
*
*
*
RoutineName = 'RangeChk'
Common /TicketCommon/ Ticket_Group,
Ticket_Sequence,Set_Key, Mod_Root_Path,
Generic_Root_Path, Chk_Hash_File_Name,
Mod_Run_Num
DEFFUN
LogToHashFile(ModRunNum,Ticket_Group,Ticket_Seque
nce,Set_Key,Table,FieldName,Key,Error,Text,Severi
tyInd) Calling 'DSU.LogToHashFile'
Table = "Min: " : MinValue "to Max: " :
MaxValue
Msg1 = ""
Msg2 = ""
Msg3 = ""
Msg4 = ""
Ans = ""
If Num (Value) = 0 then
Msg1 = "-Value is not a number"
Ans = -2
End
If Num (Value) = 0 then
Msg2 = "-MinValue is not a number"
Ans = -2
End
If Num (Value) = 0 then
Msg3 = "-MaxValue is not a number"
Ans = -2
Page 169 of 243
End
If Ans <> -2 Then
If Value < MinValue Or Value > MaxValue Then
Msg4 = "-Value is outside the Range"
Ans = -1
End
End
OutputMsg = Msg : Msg1 : Msg2 : Msg3: Msg4
*Call DSLogInfo(OutputMsg, RoutineName )
If Ans <> -1 and Ans <> -2 then Ans = Value
If (Ans = "-1" or Ans = "-2") and ErrorLogInd
= "Y" Then

Ret_Code=LogToHashFile(Mod_Run_Num,Ticket
_Group,Ticket_Sequence,Set_Key,Table,FieldName,Va
lue,Ans,OutputMsg,SeverityInd)
End
RETURN(Ans)
ReadParameter:
Read parameter value from configuration file
`
` Function : ReadParameter - Read parameter value from
configuration file
` Arg : ParameterName
(default1OB_PARAMETER)
` DefaultValue (default'')
` Config file (defaultPATH/config.ini)
` Return : Parameter value from config file
Function
Readparameters(parametersname,Defaultvalue,Config
File)
* Function : ReadParameter - Read parameter value
from configuration file
* Arg : ParameterName
(default=JOB_PARAMETER)
* DefaultValue (default='')
* Config file
(default=@PATH/config.ini)
* Return : Parameter value from config file
*
If ParameterName = "" Then ParameterName =
"JOB_PARAMETER"
Page 170 of 243
If ConfigFile = "" Then ConfigFile =
@PATH:"/config.ini"
ParameterValue = DefaultValue
OpenSeq ConfigFile To fCfg
Else Call DSLogFatal("Error opening file
":ConfigFile, "ReadParameter")
Loop
While ReadSeq Line From fCfg
If Trim(Field(Line,'=',1)) = ParameterName
Then
ParameterValue = Trim(Field(Line,'=',2))
Exit
End
Repeat
CloseSeq fCfg
Ans = ParameterValue
RETURN(Ans)
ReturnNumber:
String=Arg1
Slen=Len(String)
Scheck=0
Rnum=""
For Scheck = 1 to Slen
Schar=Substrings(String,Scheck,1)
If NUM(Schar) then

Rnum=Rnum:Schar
End
Next Outer
Ans=Rnum
ReturnNumbers:
length=0
length=LEN(Arg1);
length1=1;
Outer=length;
postNum=''
counter=1;
For Outer = length to 1 Step -1
Arg2=Arg1[Outer,1]
If NUM(Arg2)
then
Page 171 of 243
length2=counter-1
if length2 = 0
then
length2=counter
postNum=RIGHT(Ar
g1,length2)
END
else
postNum=RIGHT(Ar
g1,counter)
END
END
counter=counter+1
Next Outer
Ans=postNum
ReverseDate:
Function ReverseDate(DateVal)
* Function ReverseDate(DatelVal)
* Date mat be in the form of DDMMYYYY i.e.
01102003 or DMMYYYY 1102003
If Len(DateVal) = 7 then
NDateVal = "0" : DateVal
End Else
NDateVal = DateVal
End
Ans = NDateVal[5,4] : NDateVal[3,2] :
NDateVal[1,2]

Run1ob:
The routine runs a job. 1ob parameters may be supplied.
The result is a dynamic array containing the job status,
and row count information for each link. The routine
UtilityGetRun1obInfo can be used to interpret this result.
As well as the job name and job parameters, the routine
parameters allow the job warning limit and row count
limit to be set.
Format of returned dynamic array:
Status<1>1obnameFinishStatus
Status<2>1obname
Status<3>1obStartTimeStamp
Status<4>1obStopTimeStamp
Page 172 of 243
Status<5>LinkNames (value mark VM delimited)
Status<6>RowCount (value mark VM delimited)
FunctionRun1ob(Arg1,Arg2,Arg3,Arg4)
* Demonstrate how to run a job within the GUI
development enviroment. Arguments may
* be passed in. The result is a dynamic array
with the resulting status and run
* statistics (row counts for every link on every
stage in the job)
*
$INCLUDE DSINCLUDE JOBCONTROL.H
Equate RoutineName To 'RunJob'
Equate RunJobName to Arg1
Equate Params To Arg2
Equate RowLimit To Arg3
Equate WarnLimit To Arg4
Dim Param(100,2) ;* Limited to max of 100
parameters
Deffun DSRMessage(A1, A2, A3) Calling
"*DataStage*DSR_MESSAGE"
Deffun DSRTimestamp Calling "DSR_TIMESTAMP"
JobHandle = ''
Info = ''
ParamCount = Dcount(Params,'|')
If RowLimit = '' Then RowLimit = 0
If WarnLimit = '' Then WarnLimit = 0
For ParamNum = 1 to ParamCount
Param(ParamNum,1) =
Field(Field(Params,'|',ParamNum),'=',1)
Param(ParamNum,2) =
Field(Field(Params,'|',ParamNum),'=',2)
Next ParamNum
JobStartTime = DSRTimestamp()
JobHandle = DSAttachJob(RunJobName,
DSJ.ERRFATAL)
* Prepare the job
ErrorCode = DSPrepareJob(JobHandle)

Message = DSRMessage('DSTAGE_TRX_I_0014',
'Attaching job for processing - %1 - Status of
Attachment = %2', RunJobName:@FM:JobHandle )
Call DSLogInfo(Message, RoutineName)
LimitErr = DSSetJobLimit(JobHandle,
DSJ.LIMITROWS, RowLimit)
Page 173 of 243
LimitErr = DSSetJobLimit(JobHandle,
DSJ.LIMITWARN, WarnLimit)
* Need to check if error occurred.
ListOfParams = DSGetJobInfo(JobHandle,
DSJ.PARAMLIST)
ListCount = Dcount(ListOfParams,',')
For ParamNum = 1 To ParamCount
Message = DSRMessage('DSTAGE_TRX_I_0015',
'Setting Job Param - %1 Setting to %2',
Param(ParamNum,1):@FM:Param(ParamNum,2))
Call DSLogInfo(Message, RoutineName)
ErrCode = DSSetParam(JobHandle,
Param(ParamNum,1),Param(ParamNum,2))
Next ParamNum
ErrCode = DSRunJob(JobHandle, DSJ.RUNNORMAL)
ErrCode = DSWaitForJob(JobHandle)
Status = DSGetJobInfo(JobHandle,
DSJ.JOBSTATUS)
JobEndTime = DSRTimestamp()
If Status = DSJS.RUNFAILED Then
Message =
DSRMessage( 'DSTAGE_TRX_E_0020', 'Job Failed:
%1', RunJobName)
Call DSLogWarn(Message, RoutineName)
End
* Retrieve more information about this job run.
Message = DSRMessage('DSTAGE_TRX_I_0016',
'Getting job statistics', '' )
Call DSLogInfo(Message, RoutineName)
StageList =
DSGetJobInfo(JobHandle,DSJ.STAGELIST)
Message = DSRMessage('DSTAGE_TRX_I_0017',
'List of Stages=%1', StageList )
Call DSLogInfo(Message, RoutineName)
StageCount = Dcount(StageList, ',') ; *
Count number of active stages.
Info<1> = RunJobName
Info<2> = JobStartTime ;* StartTime
(Timestamp format)
Info<3> = JobEndTime ;* Now/End (Timestamp
format)
FOR Stage = 1 To StageCount
* Get links on this stage.
LinkNames =
DSGetStageInfo(JobHandle,Field(StageList,',',Stag
e),DSJ.LINKLIST)
Message =
DSRMessage( 'DSTAGE_TRX_I_0018', 'LinkNames for
Stage.%1 = %2',
Field(StageList,',',Stage):@FM:LinkNames)
Call DSLogInfo(Message, RoutineName)
Page 174 of 243
LinkCount = Dcount(LinkNames,',')
For StageLink = 1 To LinkCount
* Get Rowcount For this linkname
RowCount =
DSGetLinkInfo(JobHandle,Field(StageList,',',Stage
),Field(LinkNames,',',StageLink),DSJ.LINKROWCOUNT
)
Message =
DSRMessage( 'DSTAGE_TRX_I_0019', 'RowCount for
%1.%2=%3',
Field(StageList,',',Stage):@FM:Field(LinkNames,',
',StageLink):@FM:RowCount)
Call DSLogInfo(Message, RoutineName)
Info<4,-1> =
Field(StageList,',',Stage):'.':Field(LinkNames,',
',StageLink)
Info<5,-1> = RowCount
Next StageLink
Next Stage
Message = DSRMessage( 'DSTAGE_TRX_I_0020',
'RunJob Status=%1', Info )
Call DSLogInfo(Message, RoutineName)
Ans = RunJobName:'=':Status:@FM:Info
RunJobAndDetach:
The routine runs a job. Job parameters may be
supplied. The job is detached from so tht others
may be started immediately and the control job
finish.
As well as the job name and job parameters, the
routine parameters allow the job warning limit
and row count limit to be set.
FunctionRunDetach1ob(Arg1,Arg2,Arg3,Arg4)
* Run a job, and detach from it so that this job
can end
*
$INCLUDE DSINCLUDE JOBCONTROL.H
Equate RoutineName To 'RunJobAndDetach'
Equate RunJobName To Arg1
Equate Params To Arg2
Equate RowLimit To Arg3
Equate WarnLimit To Arg4
Page 175 of 243
Dim Param(100,2) ;* Limited to max of 100
parameters
Deffun DSRMessage(A1, A2, A3) Calling
"*DataStage*DSR_MESSAGE"
Deffun DSRTimestamp Calling "DSR_TIMESTAMP"
JobHandle = ''
Info = ''
ParamCount = Dcount(Params,'|')
If RowLimit = '' Then RowLimit = 0
If WarnLimit = '' Then WarnLimit = 0
For ParamNum = 1 to ParamCount
Param(ParamNum,1) =
Field(Field(Params,'|',ParamNum),'=',1)
Param(ParamNum,2) =
Field(Field(Params,'|',ParamNum),'=',2)
Next ParamNum
* Attach to the job
JobHandle = DSAttachJob(RunJobName,
DSJ.ERRWARN)
If JobHandle = 0
Then Call DSLogInfo("Job ":RunJobName:" not
started - attach failed",RoutineName)
Else
* Prepare the job
ErrorCode = DSPrepareJob(JobHandle)

Message = DSRMessage('DSTAGE_TRX_I_0014',
'Attaching job for processing - %1 - Status of
Attachment = %2', RunJobName:@FM:JobHandle )
Call DSLogInfo(Message, RoutineName)
LimitErr = DSSetJobLimit(JobHandle,
DSJ.LIMITROWS, RowLimit)
LimitErr = DSSetJobLimit(JobHandle,
DSJ.LIMITWARN, WarnLimit)
* Need to check if error occurred.
ListOfParams = DSGetJobInfo(JobHandle,
DSJ.PARAMLIST)
ListCount = Dcount(ListOfParams,',')
For ParamNum = 1 To ParamCount
Message =
DSRMessage('DSTAGE_TRX_I_0015', 'Setting Job
Param - %1 Setting to %2',
Param(ParamNum,1):@FM:Param(ParamNum,2))
Call DSLogInfo(Message, RoutineName)
ErrCode = DSSetParam(JobHandle,
Param(ParamNum,1),Param(ParamNum,2))
Next ParamNum
ErrCode = DSRunJob(JobHandle,
DSJ.RUNNORMAL)
ErrCode = DSDetachJob(JobHandle)
End
Page 176 of 243
Ans = 0
RunShellCommandReturnStatus:
Function RunShellcommandreturnstatus(Command)
Call DSLogInfo('Running
command:':Command,'RunShellCommandReturnStatus')
Call DSExecute('UNIX',Command,Ans,Ret)
Call DSLogInfo('Output from
command:':Ans,'RunShellCommandReturnStatus')
Return(Ret)
SegKey:
Segment_Num: An Integer number representing the
order number of the Segment in the IDoc
Segment_Parm: A Segment Parameter containing a
string of Y's and N's in order of Segment_Num
denoting of the segment should be written to in
this Module
Key: The Value to Be Mapped
ErrorLogInd: An Indicator to indicate of errors
should be logged (Note this is not yet
implemented)
Function
Seqkey(Segment_Num,segmentparam,key,ErrorLogInd)
* FUNCTION SegKey(Value,ErrorLogInd)
*
* Executes a lookup against a hashed file using a
key
*
* Input Parameters : Arg1: Segment_Num
* Arg2: Segment_Parm
* Arg1: Key = An
ordered Pip separated set of Seqment Primary Key
Fields
* Arg2: ErrorLogInd = An
Indicator to indicate of errors should be logged
(Note this is not yet implemented)
*
* Return Values: If the Value is not found,
return value is: -1. or the Default value if that
is supplied
* If Format Table not found,
return value is: -2
*
*
Page 177 of 243
*
RoutineName = 'SegKey'
BlankFields = ""
CRLF = Char(13) : Char(10)
Message = "IN Seg Key" : Segment_Num :
"|" : Segment_Parm : "|" : Key : "|" :
ErrorLogInd : "|"
* Call DSLogInfo(Message, RoutineName )
* Determine if this segment should output
Write_Ind = Field(Segment_Parm,"|",Segment_Num)
If Write_Ind = "Y" then
* Count how many keys
NumKeys = Dcount(Key,"|")
* Make a list of any keys that are missing
Blank_Key_Cnt = 0
ReturnKey = ""
For i = 1 to NumKeys
Key_Part = Field(Key,"|",i)
if Key_Part = "" Then
Blank_Key_Cnt = Blank_Key_Cnt + 1
BlankFields<Blank_Key_Cnt> = i
end

ReturnKey = ReturnKey : Key_Part
Next i
If Blank_Key_Cnt > 0 and ErrorLogInd = "Y"
then
Message = "Error in Segment Key: ":
Segment_Num : " There are " : Blank_Key_Cnt : "
Missing Key Parts " : "The Missing Key Parts
are" : BlankFields
* Call DSLogInfo(Message, RoutineName )
End

If Blank_Key_Cnt > 0 then

Ans = "Invalid_Key"
End Else
Ans = ReturnKey
End
End
Else
Ans = "Invalid_Key"
End
Page 178 of 243
SetDSParamsFromFile:
A before job subroutine to set Job parameters
from an external flat file
Input Arg should be of the form:
ParamDir,ParamFile
If ParamDir is not supplied, the routine assumes
the Project directory
If ParamFile is not supplied, the routine assumes
the Job Name (this could be dangerous)
The routine will abort the job if anything
doesn't go to plan
Note: a lock is placed to stop the same job from
running another instance of this routine. The
second instance will have to wait for the routine
to finish before being allowed to proceed. The
lock is released however the routine terminates
(normal, abort...)
The parameter file should contain non-blank lines
of the form
ParName = ParValue
White space is ignored.
The Routine may be invoked via the normal Before
Job Subroutine setting, or from within the 'Job
Properties->Job Control' window by entering "Call
DSU.SetParams('MyDir,MyFile',ErrorCode)"
For Andrew Webb's eyes only -
The routine could be made to work off a hashed
file, or environment variables quite easily.
It is not possible to create Job Parameters on-
the-fly because they are referenced within a Job
via an EQUATE of the form
JobParam%%1 = STAGECOM.STATUS<7,1>
JobParam%%2 = STAGECOM.STATUS<7,2> etc
This is then compiled up....So forget it!
Subroutinues
SetDsparmsformfile(inputArg,Errorcode)
$INCLUDE DSINCLUDE DSD_STAGE.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$INCLUDE DSINCLUDE DSD.H
$INCLUDE DSINCLUDE DSD_RTSTATUS.H
Equ SetParams To 'SetDSParamsFromFile'
Page 179 of 243
ErrorCode = 0 ; * set
this to non-zero to stop the stage/job
JobName = Field(STAGECOM.NAME,'.',1,2)
ParamList =
STAGECOM.JOB.CONFIG<CONTAINER.PARAM.NAMES>
If ParamList = '' Then
Call DSLogWarn('Parameters may not be
externally derived if the job has no parameters
defined.',SetParams)
Return
End
Call DSLogInfo("SetDSParmsFromFile inputarg
>" : InputArg : "<", SetParms)
ArgList = Trims(Convert(',',@FM,InputArg))
ParamDir = ArgList<1>
If ParamDir = '' Then
ParamDir = '.'
End
ParamFile = ArgList<2>
If ParamFile = '' Then
ParamFile = JobName
End
If System(91) Then
Delim = '\'
End Else
Delim = '/'
End
ParamPath = ParamDir:Delim:ParamFile
Call DSLogInfo('Setting Job Parameters from
external source ':ParamPath,SetParams)
Call DSLogInfo(JobName:' -
':ParamList,SetParams)
OpenSeq ParamPath To ParamFileVar On Error
ErrorCode = 1
Call DSLogFatal('File open error on
':ParamPath:'. Status = ':Status(),SetParams)
End Else
Call DSLogWarn('File ':ParamPath:' not
found - using default parameters.',SetParams)
Return
End
StatusFileName =
FileInfo(DSRTCOM.RTSTATUS.FVAR,1)
Readvu LockItem From DSRTCOM.RTSTATUS.FVAR,
JobName, 1 On Error
Call DSLogFatal('File read error for
':JobName:' on ':StatusFileName:'. Status =
':Status(),SetParams)
ErrorCode = 1
Page 180 of 243
Return
End Else
Call DSLogFatal('Failed to read
':JobName:' record from
':StatusFileName,SetParams)
ErrorCode = 2
Return
End
StatusId = JobName:'.':STAGECOM.WAVE.NUM
Readv ParamValues From
DSRTCOM.RTSTATUS.FVAR, StatusId, JOB.PARAM.VALUES
On Error
Release DSRTCOM.RTSTATUS.FVAR, JobName
On Error Null
ErrorCode = 1
Call DSLogFatal('File read error for
':StatusId:' on ':StatusFileName:'. Status =
':Status(),SetParams)
Return
End Else
Release DSRTCOM.RTSTATUS.FVAR, JobName
On Error Null
ErrorCode = 2
Call DSLogFatal('Failed to read
':StatusId:' record from
':StatusFileName,SetParams)
Return
End
Loop
ReadSeq ParamData From ParamFileVar On
Error
Release DSRTCOM.RTSTATUS.FVAR,
JobName On Error Null
ErrorCode = 4
Call DSLogFatal('File read error on
':ParamPath:'. Status = ':Status(),SetParams)
Return
End Else
Exit
End
Convert '=' To @FM In ParamData
ParamName = Trim(ParamData<1>)
Del ParamData<1>
ParamValue =
Convert(@FM,'=',TrimB(ParamData))
Locate(ParamName,ParamList,1;ParamPos)
Then
If
Index(UpCase(ParamName),'PASSWORD',1) = 0
Then Call DSLogInfo('Parameter
"':ParamName:'" set to
"':ParamValue:'"',SetParams)
Page 181 of 243
Else Call DSLogInfo('Parameter
"':ParamName:'" set but not displayed on
log',SetParams)
End
Else
Call DSLogWarn('Parameter
':ParamName:' does not exist in Job
':JobName,SetParams)
Continue
End
ParamValues<1,ParamPos> = ParamValue
Repeat
Writev ParamValues On
DSRTCOM.RTSTATUS.FVAR, StatusId, JOB.PARAM.VALUES
On Error
Release DSRTCOM.RTSTATUS.FVAR, JobName
On Error Null
ErrorCode = 5
Call DSLogFatal('File write error for
':StatusId:' on ':StatusFileName:'. Status =
':Status(),SetParams)
Return
End Else
Release DSRTCOM.RTSTATUS.FVAR, JobName
On Error Null
ErrorCode = 6
Call DSLogFatal('Unable to write
':StatusId:' record on ':StatusFileName:'. Status
= ':Status(),SetParams)
Return
End
Release DSRTCOM.RTSTATUS.FVAR, JobName On
Error Null
STAGECOM.JOB.STATUS<JOB.PARAM.VALUES> =
ParamValues
setParamsForFileSplit:
Using values from a control file this routine will run a job
multiple times loading the specified number of rows for
each job run.
Function setParamsForFileSplit:
(ControlFilename,1obname)
*************************************************
**********************
* Nick Bond....
*
* This routine retrieves values from a control
file and passes them as paramters to *
* a job which is run once for each record in the
control file. *
*
*
Page 182 of 243
*************************************************
**********************
$INCLUDE DSINCLUDE JOBCONTROL.H
Equate Routine TO 'setParamsForFileSplit'

Call DSLogInfo('Starting Routine ',
Routine)
vFileName = ControlFileName
vJobName = JobName
vRecord = 1
******** Open Control File and retrieve split
values.
Call DSLogInfo('Opening File: ':vFileName,
Routine)
OPEN vFileName TO vFILE ELSE Call
DSLogFatal("Can't open file: ":vFileName,
Routine)
Call DSLogInfo('File is open: ':vFileName,
Routine)
******** Start loop which gets parameters from
control file and runs job.
Loop
** Check record exists for record id
READ vStart FROM vFILE, vRecord
Then
Call DSLogInfo('Loop Started:
':vFileName, Routine)
Call DSLogInfo('Control File ID:
':vRecord, Routine)
READV vStart FROM vFILE, vRecord, 4
Then
READV vStop FROM vFILE, vRecord, 5
Then
Call DSLogInfo('Load Records: ':vStart:
' to ' :vStop, Routine)
End
End
** Set Job Parameters and Run Job.

vNewFile = 'SingleInvoice':vRecord
vJobHandle = DSAttachJob(vJobName,
DSJ.ERRFATAL)
ErrCode = DSSetParam(vJobHandle,
'StartID', vStart)
ErrCode = DSSetParam(vJobHandle,
'StopID', vStop)
Page 183 of 243
ErrCode = DSSetParam(vJobHandle,
'newfile', vNewFile )
ErrCode = DSRunJob(vJobHandle,
DSJ.RUNNORMAL)
ErrCode = DSWaitForJob(vJobHandle)
vRecord = vRecord+1
End

Else
** If record is empty leave loop
GoTo Label1
End
Repeat
******** End of Loop
Label1:
Call DSLogInfo('All records have been
processed', Routine)
Ans = vStart : ', ' : vStop
SetUserStatus:
Function Setuserstatus(Arg1)
Call DSSetUserStatus(Arg1)
Ans=Arg1
SMARTNumberConversion
Converts numbers in format 1234,567 to format 1234.57
Function SMARTNUMBERconversion(arg1)
INP = CONVERT(",",".",Arg1) ; * Commas to
decimal point
WRK = ICONV(INP,"MD33") ; *
convert to internal to 3 decimal places
Ans = OCONV(WRK,"MD23") ; *
convert to external t 2 decimal places
TicketErrorCommon
Required to use the "LogToErrorFile" Routine. This
stores variables used by the routine in shared memory:
* FUNCTION
TicketErrorCommon(Mod_Run_ID,Ticket_Group,Ticket_
Sequence,Ticket_Set_Key,Job_Stage_Name,Mod_Root_P
ath)
*
* Places the current Row Ticket in Common
Page 184 of 243
*
* Input Parameters : Arg1: Mod_Run_ID
= The unique number allocated to a run of an
Module
* Arg2: Ticket_File_ID
= The File ID assigned to the source of the
Current Row
* Arg3: Ticket_Sequence
= The Ticket Sequence Number of the Current Row
* Arg4: Ticket_Set_Key
= Identifies a set of rows e.g. an Invoice number
to set of invoice lines
* Arg5: Job_Stage_Name
= The Name of the Stage in the Job you want
recorded in the error log
* Arg6: Mod_Root_Path
= Root of the module - used for location of error
hash file
*
* Don't Return Ans but need to keep the compiler
happy
Ans = ""
RoutineName = 'ErrorTicketCommon'
Common /TicketErrorCommon/ ModRunID,
TicketFileID, TicketSequence, SetKey,
JobStageName, ModRootPath

ModRunID = Mod_Run_ID
TicketFileID = Ticket_File_ID
TicketSequence = Ticket_Sequence
SetKey = Ticket_Set_Key
JobStageName = Job_Stage_Name
ModRootPath = Mod_Root_Path
RETURN(Ans)
TVARate:
Function TvaRate(mtt_Base,mtt_TVA)
BaseFormated = "":(Mtt_Base)
TvaFormated = "":(Mtt_TVA)
If IsNull(BaseFormated) or BaseFormated = "0" or
BaseFormated= "" Then
Ans = 0
End Else
TvaFormated = Ereplace(TvaFormated, ".", "")
TvaFormated = Ereplace(TvaFormated, ",", "")
BaseFormated = Ereplace(BaseFormated, ".", "")
BaseFormated = Ereplace(BaseFormated, ",", "")
Ans = Ereplace(TvaFormated/BaseFormated, ".", "")
End
Page 185 of 243
TVATest:
Function Tvatest(Mtt_TVA,Dlco)
Country = TRIM(Dlco):";"
TestCountry =
Count("AT;BE;CY;CZ;DE;DK;EE;ES;FI;GB;GR;HU;IE;IT;
LT;LU;LV;MT;NL;PL;PT;SE;SI;SK;", Country)
Begin Case
Case Mtt_TVA <> 0
Reply = "B3"
Case Mtt_TVA = 0 And Dlco = "FR" And TestCountry
= 0
Reply = "A1"
Case Mtt_TVA = 0 And Dlco <> "FR" And TestCountry
= 1
Reply = "E6"
Case Mtt_TVA = 0 And Dlco <> "FR" And TestCountry
= 0
Reply = "E7"
Case @True
Reply = "Error"
End Case
Ans = Reply
UnTarFile:
Function Untarfile(Arg1)
DIR =
"/interface/dashboard/dashbd_dev_dk_int/Source/"
FNAME = "GLEISND_OC_02_20040607_12455700.csv"
*CMD = "ll -tr ":DIR:"|grep ":FNAME
*CMD = "cmp -s ":DIR:"|grep ":FNAME
CMD = "tar -xvvf ":DIR:FNAME
*--------------------------------
*---syntax= tar -xvvf myfile.tar
*---------------------------------
Call DSExecute("UNIX", CMD, Output,
SystemReturnCode)
Ans = Output
UtilityMessageToControllerLog
Write an informational message to the log of the
controlling job
Page 186 of 243
This routine takes a user defined message and
displays it in the job log of the controlling
sequence as an informational message.
The routine should be used sparingly in
production jobs to avoid degrading the
performance.
The return value of the function is always 1.:
Function UtilityMessageToControllerLog(Arg1)
* Write an informational message to the log of
the controlling job.
*
* This function is mainly intended for
development purposes, but can be used
* within a production environment for tracing
data values. The user should
* use this function cautiously, as it will cause
a decrease in performance
* if called often.
*
$include DSINCLUDE JOBCONTROL.H
Equate RoutineName To
"UtilityMessageToControllerLog"
InputMsg = Arg1
If Isnull(InputMsg) Then
InputMsg = " "
End
Call DSLogToController(InputMsg)
Ans = 1
UTLPropagateParms:
Routine allows a job to inherit parameter values from 1ob
Control.
This routine allows a job to inherit parameter values from
1ob Control by listing the parameters of child job and
thereafter find the parameter in the parent job, getting
value and setting parameter value in child job.
Input Argument : 1ob handle (set by using DSAttach1ob
in 1ob Control)
Page 187 of 243
Output : If a parameter is not found the routine returns 3,
otherwise 0.
Function UTLprapagateparam(Handle)
#include DSINCLUDE JOBCONTROL.H
Equ Me To 'UTLJobRun'
Ans = 0
ParentJobName =
DSGetJobInfo(DSJ.ME,DSJ.JOBNAME)
ChildParams =
Convert(',',@FM,DSGetJobInfo(Handle,DSJ.PARAMLIST
))
ParamCount = Dcount(ChildParams,@FM)
If ParamCount Then
ParentParams =
Convert(',',@FM,DSGetJobInfo(DSJ.ME,DSJ.PARAMLIST
))
Loop
ThisParam = ChildParams<1>
Del ChildParams<1>
*** Find job parameter in parent job
and set parameter in child job to value of
parent.
Locate(ThisParam,ParentParams;ParamPo
s) Then
ThisValue =
DSGetParamInfo(DSJ.ME,ThisParam,DSJ.PARAMVALUE)
ParamStatus =
DSSetParam(Handle,ThisParam,ThisValue)
Call DSLogInfo ("Setting:
":ThisParam:" To: ":ThisValue,
"UTLPropagateParms")
End
Else
*** If the parameter is not found
in parent job:
*** - write a warning to log file.
*** - return code changed to 3.
Call DSLogWarn ("Parameter :
":ThisParam:" does not exist in ":ParentJobName,
"UTLPropagateParms")
Ans = 3
End
While ChildParams # '' Do Repeat
End
Return(Ans)
UTLRunReception1ob:
This routines allows generic starting of reception jobs
without creating specific Reception Processing Sequence.
Page 188 of 243
This routines allows generic starting of reception jobs
without creating specific Reception Processing Sequence.
- Determines job to launch (sequence or elementary job)
- Attaches job
- Propagates parameters using routine
UTLPropagateParms.
- Runs job and takes action upon result (any warning
will lead to a return code NOT OK)
Obligatory parameters in input are :
- Country_Parm
- Fileset_Name_Type_Parm
- Abort_Msg_Parm
- Module_Run_Parm
Function
Utilrunrecepationjob(countryparam,fileset_name_typepa
ram,modulerunparam,Abort_msg_param)
$INCLUDE DSINCLUDE DSJ_XFUNCS.H
$INCLUDE DSINCLUDE JOBCONTROL.H
EQU Time$$ Lit "Oconv(Time(), 'MTS:'):': '"
Ans = -3

vRecJobNameBase = Country_Parm : "_" :
Fileset_Name_Type_Parm : "_Reception"
*************************************************
**************************************
***
###################
***
*************************************************
**************************************
*** Define job to launch -
Sequence or Job (START) ***
***
***
L$DefineSeq$START:
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0057\%1 (JOB %2)
started", "ReceptionJob":@FM:vRecJobNameBase))
** If Sequential Job exists - start Sequential
Job.
vJobSuffix = "_Seq"
vRecJobName = vRecJobNameBase : vJobSuffix
GoTo L$AttachJob$START
L$DefineJob$START:
** If no Sequential Job - start Elementary Job
vJobSuffix = "_Job"
Page 189 of 243
vRecJobName = vRecJobNameBase : vJobSuffix
GoTo L$AttachJob$START
L$ErrNoJob$START:
** If no job found - warn and end job
Msg = DSMakeMsg("No job found to attach" :
vRecJobNameBase : "_Seq or _Job", "")
MsgId = "@ReceptionJob"
GoTo L$ERROR
L$AttachJob$START:
Call DSLogInfo(DSMakeMsg("Checking presence of
" : vRecJobName : " for " : Module_Run_Parm, ""),
"")
jbRecepJob = vRecJobName
hRecepJob = DSAttachJob(jbRecepJob,
DSJ.ERRNONE)
If (Not(hRecepJob)) Then
AttachErrorMsg$ = DSGetLastErrorMsg()
If AttachErrorMsg$ = "(DSOpenJob) Cannot
find job " : vRecJobName Then
If vJobSuffix = "_Seq" Then GoTo
L$DefineJob$START
Else
GoTo L$ErrNoJob$START
End
End
Msg = DSMakeMsg("DSTAGE_JSG_M_0001\Error
calling DSAttachJob(%1)<L>%2",
jbRecepJob:@FM:AttachErrorMsg$)
MsgId = "@ReceptionJob"; GoTo L$ERROR
GoTo L$ERROR
End
If hRecepJob = 2 Then
GoTo L$RecepJobPrepare$START
End
***
***
*** Define job to launch -
Sequence or Job (END) ***
*************************************************
**************************************
***
###################
***
*************************************************
**************************************
*** Setup , Run and Wait for
Reception Job (START) ***
***
***
L$RecepJobPrepare$START:
*** Activity "ReceptionJob": Setup, Run and Wait
for job
hRecepJob = DSPrepareJob(hRecepJob)
If (Not(hRecepJob)) Then
Page 190 of 243
Msg = DSMakeMsg("DSTAGE_JSG_M_0012\Error
calling DSPrepareJob(%1)<L>%2",
jbRecepJob:@FM:DSGetLastErrorMsg())
MsgId = "@ReceptionJob"; GoTo L$ERROR
End
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0057\%1 (JOB %2)
started", "ReceptionJob":@FM:vRecJobName))
GoTo L$PropagateParms$START
L$PropagateParms$START:
*** Activity "PropagateParms": Propagating
parameters from parent job to child job using
separate routine.
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0058\%1 (ROUTINE %2)
started",
"PropagateParms":@FM:"DSU.UTLPropagateParms"))
RtnOk =
DSCheckRoutine("DSU.UTLPropagateParms")
If (Not(RtnOk)) Then
Msg = DSMakeMsg("DSTAGE_JSG_M_0005\BASIC
routine is not cataloged: %1",
"DSU.UTLPropagateParms")
MsgId = "@PropagateParms"; GoTo L$ERROR
End
Call 'DSU.UTLPropagateParms'(rPropagateParms,
hRecepJob)
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0064\%1 finished, reply=
%2", "PropagateParms":@FM:rPropagateParms))
IdAbortRact%%Result1%%1 = rPropagateParms
IdAbortRact%%Name%%3 = "DSU.UTLPropagateParms"
*** Checking result of routine. If <> 0 then
abort processing.
If (rPropagateParms <> 0)
Then GoTo L$ABORT
GoTo L$RecepJobRun$START
L$RecepJobRun$START:
ErrCode = DSRunJob(hRecepJob, DSJ.RUNNORMAL)
If (ErrCode <> DSJE.NOERROR) Then
Msg = DSMakeMsg("DSTAGE_JSG_M_0003\Error
calling DSRunJob(%1), code=%2[E]",
jbRecepJob:@FM:ErrCode)
MsgId = "@ReceptionJob"; GoTo L$ERROR
End
ErrCode = DSWaitForJob(hRecepJob)
GoTo L$RecepJob$FINISHED
***
***
*** Setup , Run and Wait for
Reception Job (END) ***
*************************************************
**************************************
Page 191 of 243
***
###################
***
*************************************************
**************************************
*** Verification of result
of Reception Job (START) ***
***
***
L$RecepJob$FINISHED:
jobRecepJobStatus = DSGetJobInfo(hRecepJob,
DSJ.JOBSTATUS)
jobRecepJobUserstatus =
DSGetJobInfo(hRecepJob, DSJ.USERSTATUS)
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0063\%1 finished, status=
%2[E]", "ReceptionJob":@FM:jobRecepJobStatus))
IdRecepJob%%Result2%%5 = jobRecepJobUserstatus
IdRecepJob%%Result1%%6 = jobRecepJobStatus
IdRecepJob%%Name%%7 = vRecJobName
Dummy = DSDetachJob(hRecepJob)
bRecepJobelse = @True
If (jobRecepJobStatus = DSJS.RUNOK)
Then GoTo L$SeqSuccess$START; bRecepJobelse =
@False
If bRecepJobelse Then GoTo L$SeqFail$START

***
***
*** Verification of result
of Reception Job (END) ***
*************************************************
**************************************
***
###################
***
*************************************************
**************************************
*** Definition of actions to
take on failure or success (START) ***
***
***
L$SeqFail$START:
*** Sequencer "Fail": wait until inputs ready
Call DSLogInfo(DSMakeMsg("Routine SEQUENCER -
Control End Sequence Reports a FAIL on Reception
Job", ""), "@Fail")
GoTo L$ABORT
L$SeqSuccess$START:
*** Sequencer "Success": wait until inputs ready
Call DSLogInfo(DSMakeMsg("Routine SEQUENCER -
Control End Sequence Reports a SUCCESS on
Reception Job", ""), "@Success")
GoTo L$FINISH
Page 192 of 243
***
***
*** Definition of actions to
take on failure or success (END) ***
*************************************************
**************************************
***
###################
***
L$ERROR:
Call
DSLogWarn(DSMakeMsg("DSTAGE_JSG_M_0009\Controller
problem: %1", Msg), MsgId)
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0052\Exception raised:
%1", MsgId:", ":Msg))
bAbandoning = @True
GoTo L$FINISH
L$ABORT:
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0056\Sequence failed",
""))
Call DSLogInfo(summary$,
"@UTLRunReceptionJob")
Call DSLogWarn("Unrecoverable errors in
routine UTLRunReceptionJob, see entries above",
"@UTLRunReceptionJob")
Ans = -3
GoTo L$EXIT
*************************************************
*
L$FINISH:
If bAbandoning Then GoTo L$ABORT
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0054\Sequence finished
OK", ""))
Call DSLogInfo(summary$,
"@UTLRunReceptionJob")
Ans = 0
ValidateField:
Checks the length and data type of a value. Also checks
value is a valid date if the type is Date. Any errors are
logged to the Error Hash File
Field_Value: The value from the field being validated
Field_Name: The name of the field being validated
Length: The maximum length of the field being validated
Data_Type: The data type expected - possible values
(Numeric, Alpha, Date, Char)
Page 193 of 243
Date_Format: If Data_Type is 'Date' Then the format
must be specified. The syntax for this is the same as for
the Iconv function. i.e "D/YMD4,2,2]" for a date in the
format 2004/12/23
$INCLUDE DSINCLUDE JOBCONTROL.H
vRoutineName = 'ValidateField'
DEFFUN
LogToErrorFile(Table,Field_Name,Check_Value,Error
_Number,Text_1,Text_2, Text_3, Message) Calling
"DSU.LogToErrorFile"
Common /HashLookup/ FileHandles(100), FilesOpened
Common /TicketErrorCommon/ ModRunID,
TicketFileID, TicketSequence, TicketSetKey,
JobStageName, ModRootPath
Ans = "START"
vData_Type = Downcase(Data_Type)
BEGIN CASE
******** Check the arguments
* Value being checked is null
CASE isNull(Field_Value)
Call DSTransformError("The value being checked is
Null - Field_Name = " : Field_Name,
vRoutineName)
* Argument for the data type is not valid
CASE vData_Type <> "char" AND vData_Type <>
"alpha" AND vData_Type <> "numeric" AND
vData_Type <> "date"
Call DSTransformError("The value " : Data_Type :
" is not a valid data type for routine: ",
vRoutineName)
* Length is not a number
CASE Not(Num(Length))
Call DSTransformError("The length supplied is not
a number : Field Checked " : Field_Name,
vRoutineName)
CASE vData_Type = "date" And (Date_Format = "" OR
isNull(Date_Format))
END CASE
*********
******** Check The Values
*** Check the data type of supplied value ***
If vData_Type = 'numeric' Then
If Num(Field_Value) Then
vErr = 'OK'
End Else
vErr = LogToErrorFile("No
Table",Field_Name,Field_Value,'10002','Text1','Te
xt2','Text3','Value provided is not numeric')
Ans = ' [Not Numeric]'
End
End Else
If vData_Type = 'alpha' Then
Page 194 of 243
If Alpha(Field_Value) Then
vErr = 'OK'
End Else
vErr = LogToErrorFile("No
Table",Field_Name,Field_Value,'10003','Text1','Te
xt2','Text3','Value provided is not alpha')
Ans = ' [Not Alpha]'
End
End Else
If vData_Type = 'date' Then
vErr = Iconv(Field_Value,Date_Format)
vErr = Status()
If vErr <> 0 Then
vErr = LogToErrorFile("No
Table",Field_Name,Field_Value,'10004','Text1','Te
xt2','Text3','Value provided is not a valid date
for mask ':Date_Format)
Ans = ' [Invalid Date]'
End
End Else
End
End
End
*** Check the length of the supplied value ***
If Len(Field_Value) <= Length Then
vErr = 'OK'
End Else
vErr = LogToErrorFile("No
Table",Field_Name,Field_Value,'10001','Text1','Te
xt2','Text3','Value provided is not the correct
length')
Ans = Ans : ' [Length Error]'
End
Ans = Ans
VatCheckSG:
Function VatcheckSg(Arg1)
String=Arg1
Slen=Len(String)
Scheck=0
CharCheck=0
For Scheck = 1 to Slen
Schar=Substrings(String,Scheck,1)
If NUM(Schar) <> 1 then

CharCheck=CharCheck+1
end
Page 195 of 243
Next
Ans=CharCheck
WriteParmFile:
Function writeparamfile(Arg1,Arg2,arg3,arg4)
Arg1; File Path
Arg2: File Name
Arg3: Parameter Name
Arg4: Parameter Value
vParamFile = Arg1 : "/" : Arg2
vParamName = Arg3
vParamValue = Arg4
If Arg4 = -256 Then
vParamValue = ""
End
OpenSeq vParamFile To FileVar Else
Call DSLogWarn("Cannot open ":vParamFile ,
"Cannot Open ParamFile")
End
Loop
ReadSeq Dummy From FileVar Else Exit ;* at
end-of-file
Repeat
MyLine= vParamName : "=" : vParamValue
*Write New Error File
WriteSeqF MyLine To FileVar Else
Call DSLogFatal("Cannot write to ": FileVar ,
"Cannot write to file")
End
WeofSeq FileVar
CloseSeq FileVar
Ans=MyLine
WriteSeg:
* FUNCTION SegKey(Value,ErrorLogInd)
*
* Executes a lookup against a hashed file using a
key
*
* Input Parameters : Arg1: Segment_Num
* Arg2: Segment_Parm
*
* Return Values: If the Segment should be
written return value is "Y"
* If If not return value is "N"
*
Page 196 of 243
*
*
RoutineName = 'WriteSeg'
* Determine if this segment should output
Write_Ind = Field(Segment_Parm,"|",Segment_Num)
If Write_Ind = "Y" then
Ans = "Y"
End
Else
Ans = "N"
End
SET:.O":PARA0ETERS:ROUTINE
InputArg..Arguments.
ErrorCodeArguments.
Routinuename: SetDSParamsFromFile
$INCLUDE DSINCLUDE DSD_STAGE.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$INCLUDE DSINCLUDE DSD.H
$INCLUDE DSINCLUDE DSD_RTSTATUS.H
Equ SetParams To 'SetDSParamsFromFile'
ErrorCode = 0 ; * set
this to non-zero to stop the stage/job
JobName = Field(STAGECOM.NAME,'.',1,2)
ParamList =
STAGECOM.JOB.CONFIG<CONTAINER.PARAM.NAMES>
If ParamList = '' Then
Call DSLogWarn('Parameters may not be
externally derived if the job has no parameters
defined.',SetParams)
Return
End
Call DSLogInfo("SetDSParmsFromFile inputarg
>" : InputArg : "<", SetParms)
ArgList = Trims(Convert(',',@FM,InputArg))
ParamDir = ArgList<1>
If ParamDir = '' Then
ParamDir = '.'
End
ParamFile = ArgList<2>
If ParamFile = '' Then
ParamFile = JobName
Page 197 of 243
End
If System(91) Then
Delim = '\'
End Else
Delim = '/'
End
ParamPath = ParamDir:Delim:ParamFile
Call DSLogInfo('Setting Job Parameters from
external source ':ParamPath,SetParams)
Call DSLogInfo(JobName:' -
':ParamList,SetParams)
OpenSeq ParamPath To ParamFileVar On Error
ErrorCode = 1
Call DSLogFatal('File open error on
':ParamPath:'. Status = ':Status(),SetParams)
End Else
Call DSLogWarn('File ':ParamPath:' not
found - using default parameters.',SetParams)
Return
End

End Else
Call StatusFileName =
FileInfo(DSRTCOM.RTSTATUS.FVAR,1)
Readvu LockItem From DSRTCOM.RTSTATUS.FVAR,
JobName, 1 On Error
Call DSLogFatal('File read error for
':JobName:' on ':StatusFileName:'. Status =
':Status(),SetParams)
ErrorCode = 1
ReturnDSLogFatal('Failed to read
':JobName:' record from
':StatusFileName,SetParams)
ErrorCode = 2
Return
End
StatusId = JobName:'.':STAGECOM.WAVE.NUM
Readv ParamValues From
DSRTCOM.RTSTATUS.FVAR, StatusId, JOB.PARAM.VALUES
On Error
Release DSRTCOM.RTSTATUS.FVAR, JobName
On Error Null
ErrorCode = 1
Call DSLogFatal('File read error for
':StatusId:' on ':StatusFileName:'. Status =
':Status(),SetParams)
Return
End Else
Release DSRTCOM.RTSTATUS.FVAR, JobName
On Error Null
Page 198 of 243
ErrorCode = 2
Call DSLogFatal('Failed to read
':StatusId:' record from
':StatusFileName,SetParams)
Return
End
Loop
ReadSeq ParamData From ParamFileVar On
Error
Release DSRTCOM.RTSTATUS.FVAR,
JobName On Error Null
ErrorCode = 4
Call DSLogFatal('File read error on
':ParamPath:'. Status = ':Status(),SetParams)
Return
End Else
Exit
End
Convert '=' To @FM In ParamData
ParamName = Trim(ParamData<1>)
Del ParamData<1>
ParamValue =
Convert(@FM,'=',TrimB(ParamData))
Locate(ParamName,ParamList,1;ParamPos)
Then
If
Index(UpCase(ParamName),'PASSWORD',1) = 0
Then Call DSLogInfo('Parameter
"':ParamName:'" set to
"':ParamValue:'"',SetParams)
Else Call DSLogInfo('Parameter
"':ParamName:'" set but not displayed on
log',SetParams)
End
Else
Call DSLogWarn('Parameter
':ParamName:' does not exist in Job
':JobName,SetParams)
Continue
End
ParamValues<1,ParamPos> = ParamValue
Repeat
Writev ParamValues On
DSRTCOM.RTSTATUS.FVAR, StatusId, JOB.PARAM.VALUES
On Error
Release DSRTCOM.RTSTATUS.FVAR, JobName
On Error Null
ErrorCode = 5
Call DSLogFatal('File write error for
':StatusId:' on ':StatusFileName:'. Status =
':Status(),SetParams)
Return
End Else
Page 199 of 243
Release DSRTCOM.RTSTATUS.FVAR, JobName
On Error Null
ErrorCode = 6
Call DSLogFatal('Unable to write
':StatusId:' record on ':StatusFileName:'. Status
= ':Status(),SetParams)
Return
End
Release DSRTCOM.RTSTATUS.FVAR, JobName On
Error Null
STAGECOM.JOB.STATUS<JOB.PARAM.VALUES> =
ParamValues
vnput Arg should be of the form:
ParamDir,ParamFile
If ParamDir is not supplied, the routine assumes
the Project directory
If ParamFile is not supplied, the routine assumes
the Job Name (this could be dangerous)
The routine will abort the job if anything
doesn't go to plan
Note: a lock is placed to stop the same job from
running another instance of this routine. The
second instance will have to wait for the routine
to finish before being allowed to proceed. The
lock is released however the routine terminates
(normal, abort...)
The parameter file should contain non-blank lines
of the form
ParName = ParValue
White space is ignored.
The Routine may be invoked via the normal Before
Job Subroutine setting, or from within the 'Job
Properties->Job Control' window by entering "Call
DSU.SetParams('MyDir,MyFile',ErrorCode)"
For Andrew Webb's eyes only -
The routine could be made to work off a hashed
file, or environment variables quite easily.
It is not possible to create Job Parameters on-
the-fly because they are referenced within a Job
via an EQUATE of the form
JobParam%%1 = STAGECOM.STATUS<7,1>
JobParam%%2 = STAGECOM.STATUS<7,2> etc
This is then compiled up....So forget it!
Tokens were replaced below as follows:
Page 200 of 243
* IdV0S0%%Result2%%1 <=
FR_PARIS_End_to_End_Processing_SAct.$UserStatus
* IdV0S0%%Result1%%2 <=
FR_PARIS_End_to_End_Processing_SAct.$JobStatus
* IdV0S0%%Name%%3 <=
FR_PARIS_End_to_End_Processing_SAct.$JobName
* IdV0S2%%Result1%%4 <=
Set_Job_Parameters_Routine.$ReturnValue
* IdV0S2%%Name%%6 <= Set_Job_Parameters_Routine.
$RoutineName
* IdV0S57%%Result2%%8 <=
FR_PARIS_Control_Start_Processing_SAct.
$UserStatus
* IdV0S57%%Result1%%9 <=
FR_PARIS_Control_Start_Processing_SAct.$JobStatus
* IdV0S57%%Name%%10 <=
FR_PARIS_Control_Start_Processing_SAct.$JobName
* IdV0S61%%Result2%%11 <=
FR_PARIS_Control_End_Processing_SAct.$UserStatus
* IdV0S61%%Result1%%12 <=
FR_PARIS_Control_End_Processing_SAct.$JobStatus
* IdV0S61%%Name%%13 <=
FR_PARIS_Control_End_Processing_SAct.$JobName
* IdV0S72%%Result1%%14 <= Abort_RAct.$ReturnValue
* IdV0S72%%Name%%16 <= Abort_RAct.$RoutineName
*
*** [Generated at 2005-07-07 09:41:15 - 7.1.0.8]
$INCLUDE DSINCLUDE DSJ_XFUNCS.H
EQU Time$$ Lit "Oconv(Time(), 'MTS:'):': '"
****************************************
* Graphical Sequencer generated code for Job
FR_PARIS_Control_Seq
****************************************

seq$V0S10$count = 0
seq$V0S43$count = 0
seq$V0S44$count = 0
handle$list = ""
id$list = ""
abort$list = ""
b$Abandoning = @False
b$AllStarted = @False
summary$restarting = @False
*** Sequence start point
summary$ =
DSMakeMsg("DSTAGE_JSG_M_0048\Summary of sequence
run", "")
If summary$restarting Then
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0049\Sequence restarted
after failure", ""))
End Else
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0051\Sequence started",
""))
End
GoSub L$V0S2$START
b$AllStarted = @True
GoTo L$WAITFORJOB
Page 201 of 243
*************************************************
*
L$V0S0$START:
*** Activity
"FR_PARIS_End_to_End_Processing_SAct": Initialize
job
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0057\%1 (JOB %2)
started",
"FR_PARIS_End_to_End_Processing_SAct":@FM:"FR_PAR
IS_End_to_End_Processing_Seq"))
Call DSLogInfo(DSMakeMsg("SEQUENCE - START
End_to_End_Processing_Seq", ""),
"@FR_PARIS_End_to_End_Processing_SAct")
jb$V0S0 =
"FR_PARIS_End_to_End_Processing_Seq":'.':
(Module_Run_Parm)
h$V0S0 = DSAttachJob(jb$V0S0, DSJ.ERRNONE)
If (Not(h$V0S0)) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0001\Error
calling DSAttachJob(%1)<L>%2",
jb$V0S0:@FM:DSGetLastErrorMsg())
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
h$V0S0 = DSPrepareJob(h$V0S0)
If (Not(h$V0S0)) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0012\Error
calling DSPrepareJob(%1)<L>%2",
jb$V0S0:@FM:DSGetLastErrorMsg())
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
L$V0S0$PREPARED:
p$V0S0$1 = (Project_Parm)
err$code = DSSetParam(h$V0S0, "Project_Parm",
p$V0S0$1)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Project_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$2 = (Module_Parm)
err$code = DSSetParam(h$V0S0, "Module_Parm",
p$V0S0$2)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Module_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$3 = (Run_Parm)
Page 202 of 243
err$code = DSSetParam(h$V0S0, "Run_Parm",
p$V0S0$3)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Run_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$4 = (Module_Run_Parm)
err$code = DSSetParam(h$V0S0,
"Module_Run_Parm", p$V0S0$4)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Module_Run_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$5 = (Data_Object_Parm)
err$code = DSSetParam(h$V0S0,
"Data_Object_Parm", p$V0S0$5)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Data_Object_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$6 = (Interface_Parm)
err$code = DSSetParam(h$V0S0,
"Interface_Parm", p$V0S0$6)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Interface_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$7 = (Interface_Root_Path_Parm)
err$code = DSSetParam(h$V0S0,
"Interface_Root_Path_Parm", p$V0S0$7)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Interface_Root_Path_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$8 = (Generic_Root_Path_Parm)
err$code = DSSetParam(h$V0S0,
"Generic_Root_Path_Parm", p$V0S0$8)
If (err$code <> DSJE.NOERROR) Then
Page 203 of 243
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Generic_Root_Path_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$9 = (Business_Process_Parm)
err$code = DSSetParam(h$V0S0,
"Business_Process_Parm", p$V0S0$9)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Business_Process_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$10 = (Company_Parm)
err$code = DSSetParam(h$V0S0, "Company_Parm",
p$V0S0$10)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Company_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$11 = (Country_Parm)
err$code = DSSetParam(h$V0S0, "Country_Parm",
p$V0S0$11)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Country_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$12 = (SAP_Client_Parm)
err$code = DSSetParam(h$V0S0,
"SAP_Client_Parm", p$V0S0$12)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"SAP_Client_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$13 = (Source_System_Parm)
err$code = DSSetParam(h$V0S0,
"Source_System_Parm", p$V0S0$13)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Source_System_Parm":@FM:err$code)
Page 204 of 243
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$14 = (Fileset_Type_Name_Parm)
err$code = DSSetParam(h$V0S0,
"Fileset_Name_Type_Parm", p$V0S0$14)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Fileset_Name_Type_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$15 = (Request_Type_Parm)
err$code = DSSetParam(h$V0S0,
"Request_Type_Parm", p$V0S0$15)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Request_Type_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$16 = (Timestamp_Parm)
err$code = DSSetParam(h$V0S0,
"Timestamp_Parm", p$V0S0$16)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Timestamp_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$17 = (Fileset_Parm)
err$code = DSSetParam(h$V0S0, "Fileset_Parm",
p$V0S0$17)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Fileset_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$18 = (File_Parm)
err$code = DSSetParam(h$V0S0, "File_Parm",
p$V0S0$18)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"File_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
Page 205 of 243
p$V0S0$19 = (File_Name_Parm)
err$code = DSSetParam(h$V0S0,
"File_Name_Parm", p$V0S0$19)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"File_Name_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$20 = (ISDB_Database_Parm)
err$code = DSSetParam(h$V0S0,
"ISDB_Database_Parm", p$V0S0$20)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ISDB_Database_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$21 = (ISDB_User_Parm)
err$code = DSSetParam(h$V0S0,
"ISDB_User_Parm", p$V0S0$21)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ISDB_User_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$22 = (ISDB_Password_Parm)
err$code = DSSetParam(h$V0S0,
"ISDB_Password_Parm", p$V0S0$22)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ISDB_Password_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$23 = (CSDB_Database_Parm)
err$code = DSSetParam(h$V0S0,
"CSDB_Database_Parm", p$V0S0$23)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"CSDB_Database_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$24 = (CSDB_User_Parm)
err$code = DSSetParam(h$V0S0,
"CSDB_User_Parm", p$V0S0$24)
If (err$code <> DSJE.NOERROR) Then
Page 206 of 243
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"CSDB_User_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$25 = (CSDB_Password_Parm)
err$code = DSSetParam(h$V0S0,
"CSDB_Password_Parm", p$V0S0$25)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"CSDB_Password_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$26 = (Retest_Parm)
err$code = DSSetParam(h$V0S0, "Retest_Parm",
p$V0S0$26)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Retest_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$27 = (Versions_Keep_Cnt_Parm)
err$code = DSSetParam(h$V0S0,
"Versions_Keep_Cnt_Parm", p$V0S0$27)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Versions_Keep_Cnt_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$28 = (Parm_File_Comma_Parm)
err$code = DSSetParam(h$V0S0,
"Parm_File_Comma_Parm", p$V0S0$28)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Parm_File_Comma_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$29 = (FTP_Server)
err$code = DSSetParam(h$V0S0, "FTP_Server",
p$V0S0$29)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Server":@FM:err$code)
Page 207 of 243
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$30 = (FTP_Target_Path)
err$code = DSSetParam(h$V0S0,
"FTP_Target_Path", p$V0S0$30)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Target_Path":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$31 = (FTP_Port)
err$code = DSSetParam(h$V0S0, "FTP_Port",
p$V0S0$31)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Port":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$32 = (FTP_User)
err$code = DSSetParam(h$V0S0, "FTP_User",
p$V0S0$32)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_User":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$33 = (FTP_Password)
err$code = DSSetParam(h$V0S0, "FTP_Password",
p$V0S0$33)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Password":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$34 = (Abort_Msg_Parm)
err$code = DSSetParam(h$V0S0,
"Abort_Msg_Parm", p$V0S0$34)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Abort_Msg_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
Page 208 of 243
p$V0S0$35 = (Load_ISDB_Rejects_Parm)
err$code = DSSetParam(h$V0S0,
"Load_ISDB_Rejects_Parm", p$V0S0$35)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Load_ISDB_Rejects_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$36 = (Load_ISDB_Source_Parm)
err$code = DSSetParam(h$V0S0,
"Load_ISDB_Source_Parm", p$V0S0$36)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Load_ISDB_Source_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$37 = (Source_Delimiter_Parm)
err$code = DSSetParam(h$V0S0,
"Source_Delimiter_Parm", p$V0S0$37)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Source_Delimiter_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$38 = (KTGRM_Header_Default_Parm)
err$code = DSSetParam(h$V0S0,
"KTGRM_Header_Default_Parm", p$V0S0$38)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KTGRM_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$39 = (VTWEG_Header_Default_Parm)
err$code = DSSetParam(h$V0S0,
"VTWEG_Header_Default_Parm", p$V0S0$39)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VTWEG_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$40 = (SPART_Header_Default_Parm)
err$code = DSSetParam(h$V0S0,
"SPART_Header_Default_Parm", p$V0S0$40)
If (err$code <> DSJE.NOERROR) Then
Page 209 of 243
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"SPART_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$41 = (WAERS_Local_Default_Parm)
err$code = DSSetParam(h$V0S0,
"WAERS_Local_Default_Parm", p$V0S0$41)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"WAERS_Local_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$42 = (WAERS_Foreign_Default_Parm)
err$code = DSSetParam(h$V0S0,
"WAERS_Foreign_Default_Parm", p$V0S0$42)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"WAERS_Foreign_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$43 = (KURSK_Default_Parm)
err$code = DSSetParam(h$V0S0,
"KURSK_Default_Parm", p$V0S0$43)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KURSK_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$44 = (AUART_Header_Default_Parm)
err$code = DSSetParam(h$V0S0,
"AUART_Header_Default_Parm", p$V0S0$44)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"AUART_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$45 = (ZLSCH_Header_Default_Parm)
err$code = DSSetParam(h$V0S0,
"ZLSCH_Header_Default_Parm", p$V0S0$45)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ZLSCH_Header_Default_Parm":@FM:err$code)
Page 210 of 243
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$46 = (ZTERM_Header_Default_Parm)
err$code = DSSetParam(h$V0S0,
"ZTERM_Header_Default_Parm", p$V0S0$46)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ZTERM_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$47 = (WERKS_Header_Default_Parm)
err$code = DSSetParam(h$V0S0,
"WERKS_Header_Default_Parm", p$V0S0$47)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"WERKS_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$48 = (VKORG_Header_Default_Parm)
err$code = DSSetParam(h$V0S0,
"VKORG_Header_Default_Parm", p$V0S0$48)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VKORG_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$49 = (TAXM1_Line_Default_Parm)
err$code = DSSetParam(h$V0S0,
"TAXM1_Line_Default_Parm", p$V0S0$49)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"TAXM1_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$50 = (VRKME_Line_Default_Parm)
err$code = DSSetParam(h$V0S0,
"VRKME_Line_Default_Parm", p$V0S0$50)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VRKME_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
Page 211 of 243
p$V0S0$51 = (VKGRP_Line_Default_Parm)
err$code = DSSetParam(h$V0S0,
"VKGRP_Line_Default_Parm", p$V0S0$51)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VKGRP_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$52 = (VKBUR_Line_Default_Parm)
err$code = DSSetParam(h$V0S0,
"VKBUR_Line_Default_Parm", p$V0S0$52)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VKBUR_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$53 = (LGORT_Line_Default_Parm)
err$code = DSSetParam(h$V0S0,
"LGORT_Line_Default_Parm", p$V0S0$53)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"LGORT_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$54 = (KOSTL_Line_Default_Parm)
err$code = DSSetParam(h$V0S0,
"KOSTL_Line_Default_Parm", p$V0S0$54)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KOSTL_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$55 = (ZZTAXCD_Default_Parm)
err$code = DSSetParam(h$V0S0,
"ZZTAXCD_Default_Parm", p$V0S0$55)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ZZTAXCD_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$56 = (KBETR_Revenue_Default_Parm)
err$code = DSSetParam(h$V0S0,
"KBETR_Revenue_Default_Parm", p$V0S0$56)
If (err$code <> DSJE.NOERROR) Then
Page 212 of 243
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KBETR_Revenue_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$57 = (KSCHL_Revenue_Default_Parm)
err$code = DSSetParam(h$V0S0,
"KSCHL_Revenue_Default_Parm", p$V0S0$57)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KSCHL_Revenue_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$58 = (KSCHL_Surcharge_Default_Parm)
err$code = DSSetParam(h$V0S0,
"KSCHL_Surcharge_Default_Parm", p$V0S0$58)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KSCHL_Surcharge_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$59 = (Reception_Job_Name_Parm)
err$code = DSSetParam(h$V0S0,
"Reception_Job_Name_Parm", p$V0S0$59)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Reception_Job_Name_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$60 = (Invocation_Parm)
err$code = DSSetParam(h$V0S0,
"Invocation_Parm", p$V0S0$60)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Invocation_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$61 = (GUNZIP_Path_Parm)
err$code = DSSetParam(h$V0S0,
"GUNZIP_Path_Parm", p$V0S0$61)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"GUNZIP_Path_Parm":@FM:err$code)
Page 213 of 243
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$62 = (Run_Error_Mgmt_Parm)
err$code = DSSetParam(h$V0S0,
"Run_Error_Mgmt_Parm", p$V0S0$62)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Run_Error_Mgmt_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$63 = "Y"
err$code = DSSetParam(h$V0S0,
"Run_Move_and_Tidy_Parm", p$V0S0$63)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Run_Move_and_Tidy_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$64 = (Update_Status_In_DB_Parm)
err$code = DSSetParam(h$V0S0,
"Update_Status_In_DB_Parm", p$V0S0$64)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Update_Status_In_DB_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S0$65 = (Run_Reconciliation_Parm)
err$code = DSSetParam(h$V0S0,
"Run_Reconciliation_Parm", p$V0S0$65)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Run_Reconciliation_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
err$code = DSRunJob(h$V0S0, DSJ.RUNNORMAL)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0003\Error
calling DSRunJob(%1), code=%2[E]",
jb$V0S0:@FM:err$code)
msg$id =
"@FR_PARIS_End_to_End_Processing_SAct"; GoTo
L$ERROR
End
handle$list<-1> = h$V0S0
id$list<-1> = "V0S0"
Page 214 of 243
Return
*************************************************
*
L$V0S0$FINISHED:
job$V0S0$status = DSGetJobInfo(h$V0S0,
DSJ.JOBSTATUS)
job$V0S0$userstatus = DSGetJobInfo(h$V0S0,
DSJ.USERSTATUS)
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0063\%1 finished, status=
%2[E]",
"FR_PARIS_End_to_End_Processing_SAct":@FM:job$V0S
0$status))
IdV0S0%%Result2%%1 = job$V0S0$userstatus
IdV0S0%%Result1%%2 = job$V0S0$status
IdV0S0%%Name%%3 =
"FR_PARIS_End_to_End_Processing_Seq"
rpt$V0S0 = DSMakeJobReport(h$V0S0, 1, "CRLF")
dummy$ = DSDetachJob(h$V0S0)
If b$Abandoning Then GoTo L$WAITFORJOB
b$V0S0else = @True
If (job$V0S0$status = DSJS.RUNOK) Then GoSub
L$V0S61$START; b$V0S0else = @False
If (job$V0S0$status = DSJS.RUNOK) Then GoSub
L$V0S43$START; b$V0S0else = @False
If b$V0S0else Then GoSub L$V0S44$START
GoTo L$WAITFORJOB
*************************************************
*
L$V0S10$START:
*** Sequencer "Run_Jobs_Seq": wait until inputs
ready
seq$V0S10$count += 1
If seq$V0S10$count < 1 Then Return
GoSub L$V0S57$START
Return
*************************************************
*
L$V0S2$START:
*** Activity "Set_Job_Parameters_Routine": Call
routine
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0058\%1 (ROUTINE %2)
started",
"Set_Job_Parameters_Routine":@FM:"DSU.SetDSParams
FromFile"))
Call DSLogInfo(DSMakeMsg("ROUTINE -
Set_Job_Parameters_Routine", ""),
"@Set_Job_Parameters_Routine")
rtn$ok =
DSCheckRoutine("DSU.SetDSParamsFromFile")
If (Not(rtn$ok)) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0005\BASIC
routine is not cataloged: %1",
"DSU.SetDSParamsFromFile")
msg$id = "@Set_Job_Parameters_Routine"; GoTo
L$ERROR
End
p$V0S2$1 = (Parm_File_Comma_Parm)
Page 215 of 243
Call 'DSU.SetDSParamsFromFile'(p$V0S2$1,
r$V0S2)
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0064\%1 finished, reply=
%2", "Set_Job_Parameters_Routine":@FM:r$V0S2))
IdV0S2%%Result1%%4 = r$V0S2
IdV0S2%%Name%%6 = "DSU.SetDSParamsFromFile"
If (r$V0S2 = 0) Then GoSub L$V0S10$START
Return
*************************************************
*
L$V0S43$START:
*** Sequencer "Success": wait until inputs ready
seq$V0S43$count += 1
If seq$V0S43$count < 3 Then Return
Call DSLogInfo(DSMakeMsg("SEQUENCER - Control
Sequence Reports a SUCCESS on all Stages", ""),
"@Success")
Return
*************************************************
*
L$V0S44$START:
*** Sequencer "Fail": wait until inputs ready
If seq$V0S44$count > 0 Then Return
seq$V0S44$count += 1
Call DSLogInfo(DSMakeMsg("SEQUENCER - Control
Sequence Reports at least one Stage FAILED", ""),
"@Fail")
GoSub L$V0S72$START
Return
*************************************************
*
L$V0S57$START:
*** Activity
"FR_PARIS_Control_Start_Processing_SAct":
Initialize job
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0057\%1 (JOB %2)
started",
"FR_PARIS_Control_Start_Processing_SAct":@FM:"FR_
PARIS_Control_Start_Processing_Seq"))
Call DSLogInfo(DSMakeMsg("SEQUENCE - START
Control_Start_Processes_Seq", ""),
"@FR_PARIS_Control_Start_Processing_SAct")
jb$V0S57 =
"FR_PARIS_Control_Start_Processing_Seq":'.':
(Module_Run_Parm)
h$V0S57 = DSAttachJob(jb$V0S57, DSJ.ERRNONE)
If (Not(h$V0S57)) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0001\Error
calling DSAttachJob(%1)<L>%2",
jb$V0S57:@FM:DSGetLastErrorMsg())
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
h$V0S57 = DSPrepareJob(h$V0S57)
If (Not(h$V0S57)) Then
Page 216 of 243
msg$ = DSMakeMsg("DSTAGE_JSG_M_0012\Error
calling DSPrepareJob(%1)<L>%2",
jb$V0S57:@FM:DSGetLastErrorMsg())
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
L$V0S57$PREPARED:
p$V0S57$1 = (Project_Parm)
err$code = DSSetParam(h$V0S57, "Project_Parm",
p$V0S57$1)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Project_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$2 = (Module_Parm)
err$code = DSSetParam(h$V0S57, "Module_Parm",
p$V0S57$2)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Module_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$3 = (Run_Parm)
err$code = DSSetParam(h$V0S57, "Run_Parm",
p$V0S57$3)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Run_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$4 = (Module_Run_Parm)
err$code = DSSetParam(h$V0S57,
"Module_Run_Parm", p$V0S57$4)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Module_Run_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$5 = (Data_Object_Parm)
err$code = DSSetParam(h$V0S57,
"Data_Object_Parm", p$V0S57$5)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Data_Object_Parm":@FM:err$code)
Page 217 of 243
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$6 = (Interface_Parm)
err$code = DSSetParam(h$V0S57,
"Interface_Parm", p$V0S57$6)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Interface_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$7 = (Interface_Root_Path_Parm)
err$code = DSSetParam(h$V0S57,
"Interface_Root_Path_Parm", p$V0S57$7)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Interface_Root_Path_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$8 = (Generic_Root_Path_Parm)
err$code = DSSetParam(h$V0S57,
"Generic_Root_Path_Parm", p$V0S57$8)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Generic_Root_Path_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$9 = (Business_Process_Parm)
err$code = DSSetParam(h$V0S57,
"Business_Process_Parm", p$V0S57$9)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Business_Process_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$10 = (Company_Parm)
err$code = DSSetParam(h$V0S57, "Company_Parm",
p$V0S57$10)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Company_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
Page 218 of 243
p$V0S57$11 = (Country_Parm)
err$code = DSSetParam(h$V0S57, "Country_Parm",
p$V0S57$11)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Country_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$12 = (SAP_Client_Parm)
err$code = DSSetParam(h$V0S57,
"SAP_Client_Parm", p$V0S57$12)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"SAP_Client_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$13 = (Source_System_Parm)
err$code = DSSetParam(h$V0S57,
"Source_System_Parm", p$V0S57$13)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Source_System_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$14 = (Fileset_Type_Name_Parm)
err$code = DSSetParam(h$V0S57,
"Fileset_Name_Type_Parm", p$V0S57$14)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Fileset_Name_Type_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$15 = (Request_Type_Parm)
err$code = DSSetParam(h$V0S57,
"Request_Type_Parm", p$V0S57$15)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Request_Type_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$16 = (Timestamp_Parm)
err$code = DSSetParam(h$V0S57,
"Timestamp_Parm", p$V0S57$16)
If (err$code <> DSJE.NOERROR) Then
Page 219 of 243
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Timestamp_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$17 = (Fileset_Parm)
err$code = DSSetParam(h$V0S57, "Fileset_Parm",
p$V0S57$17)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Fileset_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$18 = (File_Parm)
err$code = DSSetParam(h$V0S57, "File_Parm",
p$V0S57$18)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"File_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$19 = (File_Name_Parm)
err$code = DSSetParam(h$V0S57,
"File_Name_Parm", p$V0S57$19)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"File_Name_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$20 = (ISDB_Database_Parm)
err$code = DSSetParam(h$V0S57,
"ISDB_Database_Parm", p$V0S57$20)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ISDB_Database_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$21 = (ISDB_User_Parm)
err$code = DSSetParam(h$V0S57,
"ISDB_User_Parm", p$V0S57$21)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ISDB_User_Parm":@FM:err$code)
Page 220 of 243
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$22 = (ISDB_Password_Parm)
err$code = DSSetParam(h$V0S57,
"ISDB_Password_Parm", p$V0S57$22)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ISDB_Password_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$23 = (CSDB_Database_Parm)
err$code = DSSetParam(h$V0S57,
"CSDB_Database_Parm", p$V0S57$23)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"CSDB_Database_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$24 = (CSDB_User_Parm)
err$code = DSSetParam(h$V0S57,
"CSDB_User_Parm", p$V0S57$24)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"CSDB_User_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$25 = (CSDB_Password_Parm)
err$code = DSSetParam(h$V0S57,
"CSDB_Password_Parm", p$V0S57$25)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"CSDB_Password_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$26 = (Retest_Parm)
err$code = DSSetParam(h$V0S57, "Retest_Parm",
p$V0S57$26)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Retest_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
Page 221 of 243
p$V0S57$27 = (Versions_Keep_Cnt_Parm)
err$code = DSSetParam(h$V0S57,
"Versions_Keep_Cnt_Parm", p$V0S57$27)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Versions_Keep_Cnt_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$28 = (Parm_File_Comma_Parm)
err$code = DSSetParam(h$V0S57,
"Parm_File_Comma_Parm", p$V0S57$28)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Parm_File_Comma_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$29 = (FTP_Server)
err$code = DSSetParam(h$V0S57, "FTP_Server",
p$V0S57$29)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Server":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$30 = (FTP_Target_Path)
err$code = DSSetParam(h$V0S57,
"FTP_Target_Path", p$V0S57$30)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Target_Path":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$31 = (FTP_Port)
err$code = DSSetParam(h$V0S57, "FTP_Port",
p$V0S57$31)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Port":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$32 = (FTP_User)
err$code = DSSetParam(h$V0S57, "FTP_User",
p$V0S57$32)
If (err$code <> DSJE.NOERROR) Then
Page 222 of 243
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_User":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$33 = (FTP_Password)
err$code = DSSetParam(h$V0S57, "FTP_Password",
p$V0S57$33)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Password":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$34 = (Abort_Msg_Parm)
err$code = DSSetParam(h$V0S57,
"Abort_Msg_Parm", p$V0S57$34)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Abort_Msg_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$35 = (Load_ISDB_Rejects_Parm)
err$code = DSSetParam(h$V0S57,
"Load_ISDB_Rejects_Parm", p$V0S57$35)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Load_ISDB_Rejects_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$36 = (Load_ISDB_Source_Parm)
err$code = DSSetParam(h$V0S57,
"Load_ISDB_Source_Parm", p$V0S57$36)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Load_ISDB_Source_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$37 = (Source_Delimiter_Parm)
err$code = DSSetParam(h$V0S57,
"Source_Delimiter_Parm", p$V0S57$37)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Source_Delimiter_Parm":@FM:err$code)
Page 223 of 243
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$38 = (KTGRM_Header_Default_Parm)
err$code = DSSetParam(h$V0S57,
"KTGRM_Header_Default_Parm", p$V0S57$38)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KTGRM_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$39 = (VTWEG_Header_Default_Parm)
err$code = DSSetParam(h$V0S57,
"VTWEG_Header_Default_Parm", p$V0S57$39)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VTWEG_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$40 = (SPART_Header_Default_Parm)
err$code = DSSetParam(h$V0S57,
"SPART_Header_Default_Parm", p$V0S57$40)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"SPART_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$41 = (WAERS_Local_Default_Parm)
err$code = DSSetParam(h$V0S57,
"WAERS_Local_Default_Parm", p$V0S57$41)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"WAERS_Local_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$42 = (WAERS_Foreign_Default_Parm)
err$code = DSSetParam(h$V0S57,
"WAERS_Foreign_Default_Parm", p$V0S57$42)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"WAERS_Foreign_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
Page 224 of 243
p$V0S57$43 = (KURSK_Default_Parm)
err$code = DSSetParam(h$V0S57,
"KURSK_Default_Parm", p$V0S57$43)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KURSK_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$44 = (AUART_Header_Default_Parm)
err$code = DSSetParam(h$V0S57,
"AUART_Header_Default_Parm", p$V0S57$44)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"AUART_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$45 = (ZLSCH_Header_Default_Parm)
err$code = DSSetParam(h$V0S57,
"ZLSCH_Header_Default_Parm", p$V0S57$45)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ZLSCH_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$46 = (ZTERM_Header_Default_Parm)
err$code = DSSetParam(h$V0S57,
"ZTERM_Header_Default_Parm", p$V0S57$46)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ZTERM_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$47 = (WERKS_Header_Default_Parm)
err$code = DSSetParam(h$V0S57,
"WERKS_Header_Default_Parm", p$V0S57$47)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"WERKS_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$48 = (VKORG_Header_Default_Parm)
err$code = DSSetParam(h$V0S57,
"VKORG_Header_Default_Parm", p$V0S57$48)
If (err$code <> DSJE.NOERROR) Then
Page 225 of 243
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VKORG_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$49 = (TAXM1_Line_Default_Parm)
err$code = DSSetParam(h$V0S57,
"TAXM1_Line_Default_Parm", p$V0S57$49)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"TAXM1_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$50 = (VRKME_Line_Default_Parm)
err$code = DSSetParam(h$V0S57,
"VRKME_Line_Default_Parm", p$V0S57$50)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VRKME_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$51 = (VKGRP_Line_Default_Parm)
err$code = DSSetParam(h$V0S57,
"VKGRP_Line_Default_Parm", p$V0S57$51)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VKGRP_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$52 = (VKBUR_Line_Default_Parm)
err$code = DSSetParam(h$V0S57,
"VKBUR_Line_Default_Parm", p$V0S57$52)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VKBUR_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$53 = (LGORT_Line_Default_Parm)
err$code = DSSetParam(h$V0S57,
"LGORT_Line_Default_Parm", p$V0S57$53)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"LGORT_Line_Default_Parm":@FM:err$code)
Page 226 of 243
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$54 = (KOSTL_Line_Default_Parm)
err$code = DSSetParam(h$V0S57,
"KOSTL_Line_Default_Parm", p$V0S57$54)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KOSTL_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$55 = (ZZTAXCD_Default_Parm)
err$code = DSSetParam(h$V0S57,
"ZZTAXCD_Default_Parm", p$V0S57$55)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ZZTAXCD_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$56 = (KBETR_Revenue_Default_Parm)
err$code = DSSetParam(h$V0S57,
"KBETR_Revenue_Default_Parm", p$V0S57$56)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KBETR_Revenue_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$57 = (KSCHL_Revenue_Default_Parm)
err$code = DSSetParam(h$V0S57,
"KSCHL_Revenue_Default_Parm", p$V0S57$57)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KSCHL_Revenue_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
p$V0S57$58 = (KSCHL_Surcharge_Default_Parm)
err$code = DSSetParam(h$V0S57,
"KSCHL_Surcharge_Default_Parm", p$V0S57$58)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KSCHL_Surcharge_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
Page 227 of 243
p$V0S57$59 = (Invocation_Parm)
err$code = DSSetParam(h$V0S57,
"Invocation_Parm", p$V0S57$59)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Invocation_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
err$code = DSRunJob(h$V0S57, DSJ.RUNNORMAL)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0003\Error
calling DSRunJob(%1), code=%2[E]",
jb$V0S57:@FM:err$code)
msg$id =
"@FR_PARIS_Control_Start_Processing_SAct"; GoTo
L$ERROR
End
handle$list<-1> = h$V0S57
id$list<-1> = "V0S57"
Return
*************************************************
*
L$V0S57$FINISHED:
job$V0S57$status = DSGetJobInfo(h$V0S57,
DSJ.JOBSTATUS)
job$V0S57$userstatus = DSGetJobInfo(h$V0S57,
DSJ.USERSTATUS)
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0063\%1 finished, status=
%2[E]",
"FR_PARIS_Control_Start_Processing_SAct":@FM:job$
V0S57$status))
IdV0S57%%Result2%%8 = job$V0S57$userstatus
IdV0S57%%Result1%%9 = job$V0S57$status
IdV0S57%%Name%%10 =
"FR_PARIS_Control_Start_Processing_Seq"
rpt$V0S57 = DSMakeJobReport(h$V0S57, 1,
"CRLF")
dummy$ = DSDetachJob(h$V0S57)
If b$Abandoning Then GoTo L$WAITFORJOB
b$V0S57else = @True
If (job$V0S57$status = DSJS.RUNOK) Then GoSub
L$V0S43$START; b$V0S57else = @False
If (job$V0S57$status = DSJS.RUNOK) Then GoSub
L$V0S0$START; b$V0S57else = @False
If b$V0S57else Then GoSub L$V0S44$START
GoTo L$WAITFORJOB
*************************************************
*
L$V0S61$START:
*** Activity
"FR_PARIS_Control_End_Processing_SAct":
Initialize job
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0057\%1 (JOB %2)
started",
Page 228 of 243
"FR_PARIS_Control_End_Processing_SAct":@FM:"FR_PA
RIS_Control_End_Processing_Seq"))
Call DSLogInfo(DSMakeMsg("SEQUENCE START -
Control_End_Processing_Seq", ""),
"@FR_PARIS_Control_End_Processing_SAct")
jb$V0S61 =
"FR_PARIS_Control_End_Processing_Seq":'.':
(Module_Run_Parm)
h$V0S61 = DSAttachJob(jb$V0S61, DSJ.ERRNONE)
If (Not(h$V0S61)) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0001\Error
calling DSAttachJob(%1)<L>%2",
jb$V0S61:@FM:DSGetLastErrorMsg())
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
h$V0S61 = DSPrepareJob(h$V0S61)
If (Not(h$V0S61)) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0012\Error
calling DSPrepareJob(%1)<L>%2",
jb$V0S61:@FM:DSGetLastErrorMsg())
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
L$V0S61$PREPARED:
p$V0S61$1 = (Project_Parm)
err$code = DSSetParam(h$V0S61, "Project_Parm",
p$V0S61$1)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Project_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$2 = (Module_Parm)
err$code = DSSetParam(h$V0S61, "Module_Parm",
p$V0S61$2)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Module_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$3 = (Run_Parm)
err$code = DSSetParam(h$V0S61, "Run_Parm",
p$V0S61$3)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Run_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
Page 229 of 243
End
p$V0S61$4 = (Module_Run_Parm)
err$code = DSSetParam(h$V0S61,
"Module_Run_Parm", p$V0S61$4)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Module_Run_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$5 = (Data_Object_Parm)
err$code = DSSetParam(h$V0S61,
"Data_Object_Parm", p$V0S61$5)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Data_Object_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$6 = (Interface_Parm)
err$code = DSSetParam(h$V0S61,
"Interface_Parm", p$V0S61$6)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Interface_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$7 = (Interface_Root_Path_Parm)
err$code = DSSetParam(h$V0S61,
"Interface_Root_Path_Parm", p$V0S61$7)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Interface_Root_Path_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$8 = (Generic_Root_Path_Parm)
err$code = DSSetParam(h$V0S61,
"Generic_Root_Path_Parm", p$V0S61$8)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Generic_Root_Path_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$9 = (Business_Process_Parm)
err$code = DSSetParam(h$V0S61,
"Business_Process_Parm", p$V0S61$9)
Page 230 of 243
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Business_Process_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$10 = (Company_Parm)
err$code = DSSetParam(h$V0S61, "Company_Parm",
p$V0S61$10)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Company_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$11 = (Country_Parm)
err$code = DSSetParam(h$V0S61, "Country_Parm",
p$V0S61$11)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Country_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$12 = (SAP_Client_Parm)
err$code = DSSetParam(h$V0S61,
"SAP_Client_Parm", p$V0S61$12)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"SAP_Client_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$13 = (Source_System_Parm)
err$code = DSSetParam(h$V0S61,
"Source_System_Parm", p$V0S61$13)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Source_System_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$14 = (Fileset_Type_Name_Parm)
err$code = DSSetParam(h$V0S61,
"Fileset_Name_Type_Parm", p$V0S61$14)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Fileset_Name_Type_Parm":@FM:err$code)
Page 231 of 243
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$15 = (Request_Type_Parm)
err$code = DSSetParam(h$V0S61,
"Request_Type_Parm", p$V0S61$15)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Request_Type_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$16 = (Timestamp_Parm)
err$code = DSSetParam(h$V0S61,
"Timestamp_Parm", p$V0S61$16)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Timestamp_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$17 = (Fileset_Parm)
err$code = DSSetParam(h$V0S61, "Fileset_Parm",
p$V0S61$17)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Fileset_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$18 = (File_Parm)
err$code = DSSetParam(h$V0S61, "File_Parm",
p$V0S61$18)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"File_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$19 = (File_Name_Parm)
err$code = DSSetParam(h$V0S61,
"File_Name_Parm", p$V0S61$19)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"File_Name_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
Page 232 of 243
p$V0S61$20 = (ISDB_Database_Parm)
err$code = DSSetParam(h$V0S61,
"ISDB_Database_Parm", p$V0S61$20)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ISDB_Database_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$21 = (ISDB_User_Parm)
err$code = DSSetParam(h$V0S61,
"ISDB_User_Parm", p$V0S61$21)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ISDB_User_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$22 = (ISDB_Password_Parm)
err$code = DSSetParam(h$V0S61,
"ISDB_Password_Parm", p$V0S61$22)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ISDB_Password_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$23 = (CSDB_Database_Parm)
err$code = DSSetParam(h$V0S61,
"CSDB_Database_Parm", p$V0S61$23)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"CSDB_Database_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$24 = (CSDB_User_Parm)
err$code = DSSetParam(h$V0S61,
"CSDB_User_Parm", p$V0S61$24)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"CSDB_User_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$25 = (CSDB_Password_Parm)
err$code = DSSetParam(h$V0S61,
"CSDB_Password_Parm", p$V0S61$25)
If (err$code <> DSJE.NOERROR) Then
Page 233 of 243
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"CSDB_Password_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$26 = (Retest_Parm)
err$code = DSSetParam(h$V0S61, "Retest_Parm",
p$V0S61$26)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Retest_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$27 = (Versions_Keep_Cnt_Parm)
err$code = DSSetParam(h$V0S61,
"Versions_Keep_Cnt_Parm", p$V0S61$27)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Versions_Keep_Cnt_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$28 = (Parm_File_Comma_Parm)
err$code = DSSetParam(h$V0S61,
"Parm_File_Comma_Parm", p$V0S61$28)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Parm_File_Comma_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$29 = (FTP_Server)
err$code = DSSetParam(h$V0S61, "FTP_Server",
p$V0S61$29)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Server":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$30 = (FTP_Target_Path)
err$code = DSSetParam(h$V0S61,
"FTP_Target_Path", p$V0S61$30)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Target_Path":@FM:err$code)
Page 234 of 243
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$31 = (FTP_Port)
err$code = DSSetParam(h$V0S61, "FTP_Port",
p$V0S61$31)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Port":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$32 = (FTP_User)
err$code = DSSetParam(h$V0S61, "FTP_User",
p$V0S61$32)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_User":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$33 = (FTP_Password)
err$code = DSSetParam(h$V0S61, "FTP_Password",
p$V0S61$33)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"FTP_Password":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$34 = (Abort_Msg_Parm)
err$code = DSSetParam(h$V0S61,
"Abort_Msg_Parm", p$V0S61$34)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Abort_Msg_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$35 = (Load_ISDB_Rejects_Parm)
err$code = DSSetParam(h$V0S61,
"Load_ISDB_Rejects_Parm", p$V0S61$35)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Load_ISDB_Rejects_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
Page 235 of 243
p$V0S61$36 = (Load_ISDB_Source_Parm)
err$code = DSSetParam(h$V0S61,
"Load_ISDB_Source_Parm", p$V0S61$36)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Load_ISDB_Source_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$37 = (Source_Delimiter_Parm)
err$code = DSSetParam(h$V0S61,
"Source_Delimiter_Parm", p$V0S61$37)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Source_Delimiter_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$38 = (KTGRM_Header_Default_Parm)
err$code = DSSetParam(h$V0S61,
"KTGRM_Header_Default_Parm", p$V0S61$38)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KTGRM_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$39 = (VTWEG_Header_Default_Parm)
err$code = DSSetParam(h$V0S61,
"VTWEG_Header_Default_Parm", p$V0S61$39)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VTWEG_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$40 = (SPART_Header_Default_Parm)
err$code = DSSetParam(h$V0S61,
"SPART_Header_Default_Parm", p$V0S61$40)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"SPART_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$41 = (WAERS_Local_Default_Parm)
err$code = DSSetParam(h$V0S61,
"WAERS_Local_Default_Parm", p$V0S61$41)
If (err$code <> DSJE.NOERROR) Then
Page 236 of 243
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"WAERS_Local_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$42 = (WAERS_Foreign_Default_Parm)
err$code = DSSetParam(h$V0S61,
"WAERS_Foreign_Default_Parm", p$V0S61$42)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"WAERS_Foreign_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$43 = (KURSK_Default_Parm)
err$code = DSSetParam(h$V0S61,
"KURSK_Default_Parm", p$V0S61$43)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KURSK_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$44 = (AUART_Header_Default_Parm)
err$code = DSSetParam(h$V0S61,
"AUART_Header_Default_Parm", p$V0S61$44)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"AUART_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$45 = (ZLSCH_Header_Default_Parm)
err$code = DSSetParam(h$V0S61,
"ZLSCH_Header_Default_Parm", p$V0S61$45)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ZLSCH_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$46 = (ZTERM_Header_Default_Parm)
err$code = DSSetParam(h$V0S61,
"ZTERM_Header_Default_Parm", p$V0S61$46)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ZTERM_Header_Default_Parm":@FM:err$code)
Page 237 of 243
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$47 = (WERKS_Header_Default_Parm)
err$code = DSSetParam(h$V0S61,
"WERKS_Header_Default_Parm", p$V0S61$47)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"WERKS_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$48 = (VKORG_Header_Default_Parm)
err$code = DSSetParam(h$V0S61,
"VKORG_Header_Default_Parm", p$V0S61$48)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VKORG_Header_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$49 = (TAXM1_Line_Default_Parm)
err$code = DSSetParam(h$V0S61,
"TAXM1_Line_Default_Parm", p$V0S61$49)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"TAXM1_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$50 = (VRKME_Line_Default_Parm)
err$code = DSSetParam(h$V0S61,
"VRKME_Line_Default_Parm", p$V0S61$50)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VRKME_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$51 = (VKGRP_Line_Default_Parm)
err$code = DSSetParam(h$V0S61,
"VKGRP_Line_Default_Parm", p$V0S61$51)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VKGRP_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
Page 238 of 243
p$V0S61$52 = (VKBUR_Line_Default_Parm)
err$code = DSSetParam(h$V0S61,
"VKBUR_Line_Default_Parm", p$V0S61$52)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"VKBUR_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$53 = (LGORT_Line_Default_Parm)
err$code = DSSetParam(h$V0S61,
"LGORT_Line_Default_Parm", p$V0S61$53)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"LGORT_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$54 = (KOSTL_Line_Default_Parm)
err$code = DSSetParam(h$V0S61,
"KOSTL_Line_Default_Parm", p$V0S61$54)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KOSTL_Line_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$55 = (ZZTAXCD_Default_Parm)
err$code = DSSetParam(h$V0S61,
"ZZTAXCD_Default_Parm", p$V0S61$55)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"ZZTAXCD_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$56 = (KBETR_Revenue_Default_Parm)
err$code = DSSetParam(h$V0S61,
"KBETR_Revenue_Default_Parm", p$V0S61$56)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KBETR_Revenue_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$57 = (KSCHL_Revenue_Default_Parm)
err$code = DSSetParam(h$V0S61,
"KSCHL_Revenue_Default_Parm", p$V0S61$57)
If (err$code <> DSJE.NOERROR) Then
Page 239 of 243
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KSCHL_Revenue_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$58 = (KSCHL_Surcharge_Default_Parm)
err$code = DSSetParam(h$V0S61,
"KSCHL_Surcharge_Default_Parm", p$V0S61$58)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"KSCHL_Surcharge_Default_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$59 = (Invocation_Parm)
err$code = DSSetParam(h$V0S61,
"Invocation_Parm", p$V0S61$59)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Invocation_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$60 = (Run_Reconciliation_Parm)
err$code = DSSetParam(h$V0S61,
"Run_Reconciliation_Parm", p$V0S61$60)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Run_Reconciliation_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$61 = (Run_Error_Mgmt_Parm)
err$code = DSSetParam(h$V0S61,
"Run_Error_Mgmt_Parm", p$V0S61$61)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Run_Error_Mgmt_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$62 = (Update_Status_In_DB_Parm)
err$code = DSSetParam(h$V0S61,
"Update_Status_In_DB_Parm", p$V0S61$62)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Update_Status_In_DB_Parm":@FM:err$code)
Page 240 of 243
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
p$V0S61$63 = (Load_ISDB_Cmn_Fmt_Parm)
err$code = DSSetParam(h$V0S61,
"Load_ISDB_Cmn_Fmt_Parm", p$V0S61$63)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0002\Error
calling DSSetParam(%1), code=%2[E]",
"Load_ISDB_Cmn_Fmt_Parm":@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
err$code = DSRunJob(h$V0S61, DSJ.RUNNORMAL)
If (err$code <> DSJE.NOERROR) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0003\Error
calling DSRunJob(%1), code=%2[E]",
jb$V0S61:@FM:err$code)
msg$id =
"@FR_PARIS_Control_End_Processing_SAct"; GoTo
L$ERROR
End
handle$list<-1> = h$V0S61
id$list<-1> = "V0S61"
Return
*************************************************
*
L$V0S61$FINISHED:
job$V0S61$status = DSGetJobInfo(h$V0S61,
DSJ.JOBSTATUS)
job$V0S61$userstatus = DSGetJobInfo(h$V0S61,
DSJ.USERSTATUS)
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0063\%1 finished, status=
%2[E]",
"FR_PARIS_Control_End_Processing_SAct":@FM:job$V0
S61$status))
IdV0S61%%Result2%%11 = job$V0S61$userstatus
IdV0S61%%Result1%%12 = job$V0S61$status
IdV0S61%%Name%%13 =
"FR_PARIS_Control_End_Processing_Seq"
rpt$V0S61 = DSMakeJobReport(h$V0S61, 1,
"CRLF")
dummy$ = DSDetachJob(h$V0S61)
If b$Abandoning Then GoTo L$WAITFORJOB
b$V0S61else = @True
If (job$V0S61$status = DSJS.RUNOK) Then GoSub
L$V0S43$START; b$V0S61else = @False
If b$V0S61else Then GoSub L$V0S44$START
GoTo L$WAITFORJOB
*************************************************
*
L$V0S72$START:
*** Activity "Abort_RAct": Call routine
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0058\%1 (ROUTINE %2)
Page 241 of 243
started",
"Abort_RAct":@FM:"DSX.UTILITYABORTTOLOG"))
rtn$ok =
DSCheckRoutine("DSX.UTILITYABORTTOLOG")
If (Not(rtn$ok)) Then
msg$ = DSMakeMsg("DSTAGE_JSG_M_0005\BASIC
routine is not cataloged: %1",
"DSX.UTILITYABORTTOLOG")
msg$id = "@Abort_RAct"; GoTo L$ERROR
End
p$V0S72$1 = (Abort_Msg_Parm)
Call 'DSX.UTILITYABORTTOLOG'(r$V0S72,
p$V0S72$1)
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0064\%1 finished, reply=
%2", "Abort_RAct":@FM:r$V0S72))
IdV0S72%%Result1%%14 = r$V0S72
IdV0S72%%Name%%16 = "DSX.UTILITYABORTTOLOG"
Return
*************************************************
*
L$WAITFORJOB:
If handle$list = "" Then GoTo L$FINISH
handle$ = DSWaitForJob(handle$list)
If handle$ = 0 Then handle$ = handle$list<1>
Locate handle$ In handle$list Setting index$
Then
id$ = id$list<index$>
b$Abandoning = abort$list<index$>
Del id$list<index$>; Del
handle$list<index$>; Del abort$list<index$>
Begin Case
Case id$ = "V0S0"
GoTo L$V0S0$FINISHED
Case id$ = "V0S57"
GoTo L$V0S57$FINISHED
Case id$ = "V0S61"
GoTo L$V0S61$FINISHED
End Case
End
* Error if fall though
handle$list = ""
msg$ = DSMakeMsg("DSTAGE_JSG_M_0008\Error
calling DSWaitForJob(), code=%1[E]", handle$)
msg$id = "@Coordinator"; GoTo L$ERROR
*************************************************
*
L$ERROR:
Call
DSLogWarn(DSMakeMsg("DSTAGE_JSG_M_0009\Controller
problem: %1", msg$), msg$id)
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0052\Exception raised:
%1", msg$id:", ":msg$))
abort$list = Ifs(handle$list, Str(1:@FM,
DCount(handle$list, @FM)), "")
b$Abandoning = @True
GoTo L$WAITFORJOB
L$ABORT:
Page 242 of 243
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0056\Sequence failed",
""))
Call DSLogInfo(summary$, "@Coordinator")
Call
DSLogFatal(DSMakeMsg("DSTAGE_JSG_M_0013\Sequence
job will abort due to previous unrecoverable
errors", ""), "@Coordinator")
*************************************************
*
L$FINISH:
If b$Abandoning Then GoTo L$ABORT
If Not(b$AllStarted) Then Return
summary$<1,-1> = Time$$:Convert(@VM, " ",
DSMakeMsg("DSTAGE_JSG_M_0054\Sequence finished
OK", ""))
Call DSLogInfo(summary$, "@Coordinator")
L$EXIT: Return To L$EXIT

Page 243 of 243

Potrebbero piacerti anche