Sei sulla pagina 1di 3

How to unlock the jobs :

Through Unix:

'1.telnet to DS server machine as ds administrative account (dsadm or root for example);


2. cd to $DSHOME - to go to DSEngine;
3. source dsenv by “. ./dsenv”; (read as dot_space_dot_dsenv)
4. run “bin/uvsh” to enter TCL prompt
5. run “>LIST.READU EVERY”, are you able to find any lock for the project under Active Record
Locks? If yes, mark down the Userno for the command below;
6 run “>UNLOCK USER userno ALL”;
7. run “>LIST.READU EVERY” again to verify the lock for the user is gone;
8. repeat step 6 and 7 until all locks for the project is clear;
9. run “>LO” to exit TCL prompt.'

After bin/uvsh we will get prompt like below


> LIST.READU EVERY

Device.. Inode.. Netnode Userno lmode pid loginid Iteamid...


64769 5032771 0 44235 6 RL 21301 vb00000 Rt-LOG 40
64769 5459624 0 47357 9 RL 21929 dsumaadm RT-LO698
64769 5037710 0 12630 22 Rl 22563 ite2677 RT-
config99

Through DataStage :

1.just open administrator


2.Go to projects tab
3.click on command button.
4.Give list.readu command and press execute(It gives you all the jobs status
and please not the PID(Process ID) of those jobs which you want to unlock)
5.Now close that and again come back to command window.
6.now give the command ds.tools and execute
7.read the options given there.... and type "4" (option)
8.and now give 6/7 depending up on ur requirement...
9.Now give the PID that you have noted before..
10.Then "yes"
11.Generally at first time it won't work.. but if we press again 7 then
after that give PID again.. It ll work....

DataStage library functions in the Job


Basic operators:
Mathematical operators: +, -, *, /
Relational operators: =, ",", "=, =>
Logical operators: And, Not, Or
Concatenation operator: ":" - "The employee's name is": lname: ",": fname
Interception of a string: String type have this property, directly followed by the string [], indicating
the start, you can intercept the string
Array of characters, from the beginning, and not from "0" to start. "String [star, length]"
"APPL3245" [1,4] -> "APPL"
"APPL3245" [5,2] -> "32"
IF operator:
Method I: variable = If condition Then expression Else expression
If Column1> 100 Then "A" Else "B"

Method II: If condition Else statement


If condition
Else
statements
End
Method III: If condition Then statement
If condition
Then
statements
End

Method IV: If condition Then statements [Else statements]


If condition
Then statements
End
[Else statements
End]

Note to REM *! $ * At the beginning of the comment

System variables:
1, @ Date, @ Time -> Jobs is running the date and time, year, month, day and date functions are
obtained from.
2, @ InRowNum, @ OutRowNum -> number of records to import, export, number of records.
3, @ LogName -> login user name.
4, @ Null -> returns null.
5, @ True, @ False -> return a Boolean value.
@ True = 1
@ False = 0
6, @ Who -> get the name of the current project.

And the use of Iconv Iconv Oconv function to convert date to a string using the date of conversion
into an international figure is the number of days.
To December 31, 1967 as the base point, that point in the DataStage is "0."
Use Oconv to the number of days to a date, be converted into a format string.
Use "D" word conversion code, use the date format to display.
"D4-MDY [2,2,4]":
1, D represents the date of the conversion code.
That the median of 2,4 years.
3, - said a "-" separator.
4, MDY years at the display order.
5, [2,2,4] According to the front of the display order to show the number of bits in the month.
Iconv ("12-31-67", "D2-MDY [2,2,2]") -> 0
Iconv ("12311967", "D4 MDY [2,2,4]") -> 0
Iconv ("31-12-1967", "D-DMY [2,2,4]") -> 0
Oconv (0, "D4-MDY [2,2,4]") -> 12-31-1967
Oconv (0, "D2/DMY [2,2,2]") -> 31/12/67
Oconv (10, "D / YDM [4,2, A10]") -> 1967/10/January
Oconv (Iconv ("12-31-67", "D2-MDY [2,2,2]"), "D / YDM [4,2, A10]") -> 1967/31/December

Time:
X = Oconv (10000, "MT") X = "02:46"
X = Oconv (10000, "MTHS") X = "02:46:40 am"
X = Oconv (10000, "MTH") X = "02:46 am"
X = Oconv (10000, "MT.") X = "02.46"
X = Oconv (10000, "MTS") X = "02:46:40"
X = Oconv (time (), "MTS") X = current system time

FAQ:
1. To determine whether the string is empty

Len (trim (variable)) = 0


IsNull (variable)

2. On the date of treatment


Ereplace (DSLink30.PDATE ,"-","") the "-" date separator in the string "-" replace
Date.tag (date ()) system date to "-" to separate 2007-08-21
Tomorrow = Oconv (Date () + 1, "D4/YMD") "1997/5/24"
DateCurrentDateTime (date ()) 2007-08-22 11:44:34.000 (DS Routine)
DSJobStartDate 2007-08-22
DSJobStartTime 11:48:58
DSJobStartTimestamp 2007-08-22 11:48:58
Ereplace (Date.tag (date ()), "-", ""): Ereplace (Oconv (time (), "MTS"), ":", "") 20070822114434

Potrebbero piacerti anche