ExecTCL

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

Moderators: chulett, rschirm, roy

Post Reply
shyju
Participant
Posts: 58
Joined: Thu May 19, 2005 1:00 am

ExecTCL

Post by shyju »

Hi,
I would like to know wht does TCL stand for in ExecTCL? I had searched the DataStage help but i was unable to get any information abt this. Also I would like to know what is the function of ExecTCL. When it is used and its purpose. What is the syntax of ExecTCL?
It would be very greateful if any of you guys give me a detailed explanations regarding the same.

Thx
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

For me the TCL has always denoted "The Command Line" but I am sure that the "T" letter has some more official meaning. The Pick type database systems (of which UniVerse and DataStage are examples) were, at one time, the actual operating system and the ">" prompt was effectively the OS prompt or the command line. Today the UniVerse system is just a virtual machine residing on top of another OS, but the concept has remained.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ArndW wrote:For me the TCL has always denoted "The Command Line" but I am sure that the "T" letter has some more official meaning.
Actually, they all do. :wink: Terminal Control Language.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Craig,

thanks! I knew I was wrong, but didn't realize how wrong. I'm pretty good with stuff like BASIC,COBOL,SPOOL,RPG,FTN and the like and I can hold my own with ASCII,EBCDIC,ANSII but you got me here. :shock: 8)

btw, what are you doing at the screen at this ungodly hour of your night?
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

He has no life like the rest of the top posters.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not only that, but DataStage still supports (and uses, internally, mainly 'coz Glenn Herbert lervs 'em) PROCs. These are derivative from the "Pick O/S". :twisted:

Code: Select all

0001: PQ
0002: IF %2 = "DICT" GOSUB 888
0003: IF %2 # "DICT" GOSUB 999
0004: C - Read first item
0005: F-READ 1 %%20
0006: MV &1.1 "{TEMP}"
0007: F-DELETE 1
0008: C - Increment argument
0009: F;C1;%20;++;?%20
0010: C - Read second item
0011: F-READ 2 %%20
0012: MV &2.1 "{TEMP}"
0013: F-DELETE 2
0014: C - Save one id
0015: MV %9 &1.0
0016: C - Swap id
0017: MV &1.0 &2.0
0018: IF &1.1 # "{TEMP}" GOSUB 777
0019: C - Store id
0020: MV &2.0 %9
0021: IF &2.1 # "{TEMP}" GOSUB 666
0022: RTN
0023: 666 C - Write second item
0024: F-WRITE 2
0025: RSUB
0026: 777 C - Write first item
0027: F-WRITE 1
0028: RSUB
0029: 888 C - Open DICT of file
0030: F-OPEN 1 DICT %3
0031: Qunable to open file
0032: F-OPEN 2 DICT %3
0033: Qunable to open file
0034: MV %20 "4"
0035: RSUB
0036: 999 C - Open DATA of file
0037: F-OPEN 1 %2
0038: Qunable to open file
0039: F-OPEN 2 %2
0040: Qunable to open file
0041: MV %20 "3"
0042: RSUB
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ray,

coming from the UniVerse side of the world, I hated having to learn all about those weird PROCs and still avoid 'em, but they do have some incredibly powerful features if you know how to program them; certainly beats the old PAragraphs. I have trouble enough with inverse Polish and never got the hang of using HP calculators... :shock:
shyju
Participant
Posts: 58
Joined: Thu May 19, 2005 1:00 am

Post by shyju »

Thank u very much chulett, Ray and ArndW for wht TCL stands for. But can provide answers for rest of my questions?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

So, the Terminal Control Language is the base level of the database environment that underlies DataStage Server. There are some commands that you might have occasion to use from DataStage jobs or from the Administrator that need to access this level; often the cleanup commands such as DS.TOOLS are called from a TCL session instead of from the Administrator window. Certain hash file commands to RESIZE or CLEAR.FILE are also done here. If you search this forum for "command line" and/or "DSExecute" you will find numerous posts that suggest commands to be executed and places where they make sense. Most DataStage jobs or projects never require a call to the TCL level.

The source code (in DataStage basic) is available if you look at the ExecTCL command in the manager; it expects the command as the first argument and returns an error code in the second. The function is just a wrapper around the actual call, which is DSExecute("TCL", InputArg, Output, SystemReturnCode).
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

kduke wrote:He has no life like the rest of the top posters.
:lol:
-craig

"You can never have too many knives" -- Logan Nine Fingers
shyju
Participant
Posts: 58
Joined: Thu May 19, 2005 1:00 am

Post by shyju »

Thx a lot for this prompt reply ArndW. It was really helpful
charles.craig@physiciansm
Participant
Posts: 15
Joined: Wed May 11, 2005 12:09 pm

From www.webopedia.com

Post by charles.craig@physiciansm »

From www.webopedia.com
TCL (outside of DataStage)
Short for Tool Command Language, and pronounced T-C-L or tickle, a powerful interpreted programming language developed by John Ousterhout. One of the main strengths of Tcl is that it can be easily extended through the addition of custom Tcl libraries. It is used for prototyping applications as well as for developing CGI scripts, though it is not as popular as Perl for the latter.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

ExecTCL is a before/after subroutine. As such it has no syntax per se. You load it up in the properties of any job or active stage, and place the command to be executed in the Input Value field.
If the command succeeds, the job keeps going. If the command fails, the job stops.
Source code for ExecTCL is supplied, in the Routines branch of the repository.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply