It is difficult to match column names "fid" with "fin" and almost impossible to match "rid" with "tin". So I discontinued that.
Given the column names match (fid=fid, rid=rid), try
I am trying to transpose tables listed in the format into format. Any help would be greatly appreciated.
Input:
test_data_1
1 2 90%
4 3 91%
5 4 90%
6 5 90%
9 6 90%
test_data_2
3 5 92%
5 4 92%
7 3 93%
9 2 92%
1 1 92%
...
Output:... (7 Replies)
Hi ,
I want to read the data from 9 tables in oracle DB into 9 different files in the same connection instance (session). I am able to get data from one table to one file with below code :
X=`sqlplus -s user/pwd@DB <<eof
select col1 from table1;
EXIT;
eof`
echo $X>myfile
Can anyone... (2 Replies)
Hi
I am having a question where I have to
1) Identify the number of files in a directory with a specific format
and if the count is >1 we need to concatenate those two files into one file and remember that in the second file the header should not be copied. it should be form first file.... (4 Replies)
Hi,
I'd like to process multiple files. For example:
file1.txt
file2.txt
file3.txt
Each file contains several lines of data. I want to extract a piece of data and output it to a new file.
file1.txt ----> newfile1.txt
file2.txt ----> newfile2.txt
file3.txt ----> newfile3.txt
Here is... (3 Replies)
Hi..Can anyone suggest a simple way of achieving this. I have several files which ends with extension .vcf . I will give example with two files
In the below files, we are interested in
File 1:
38 107 C 3 T 6 C/T
38 241 C 4 T 5 C/T
38 247 T 4 C 5 T/C
38 259 T 3 C 6 T/C... (8 Replies)
multiple files to load into different tables,
I have a script show below, but this script loads data from txt file into a table,
but i have multiple input files(xyzload.txt,xyz1load.txt,xyz2load.txt......) in the unix folder ,
can we load these files in diff tables (table 1, table2... (0 Replies)
multiple files to load into different tables,
I have a script show below, but this script loads data from txt file into a table,
but i have multiple input files(xyzload.txt,xyz1load.txt,xyz2load.txt......) in the unix folder ,
can we load these files in diff tables (table 1, table2... (1 Reply)
HI
I have a dsv file that looks like:
<<BOF>>
record_number|id_number|first name|last name|msisdn|network|points|card number|gender
312|9101011234011|Test Junior|Smith|071 123 4321|MTN|73|1241551413214444|M
313|9012023213011|Bob|Smith|27743334321|Vodacom|3|1231233232323244|M... (4 Replies)
Experts,
I am writing a script and able to write only small piece of code and not able to collect logic to complete this task.
In input file have to look for name like like this (BGL_HSR_901_1AG_A_CR9KTR10) before sh iss neors. Record this (BGL_HSR_901_1AG_A_CR9KTR10) in csv file
Now have to... (0 Replies)
Hello All,
just wanted to export multiple tables from oracle sql using unix shell script to csv file and the below code is exporting only the first table.
Can you please suggest why? or any better idea?
export FILE="/abc/autom/file/geo_JOB.csv"
Export= `sqlplus -s dev01/password@dEV3... (16 Replies)
Discussion started by: Hope
16 Replies
LEARN ABOUT OSX
body
body(n) [incr Tcl] body(n)
__________________________________________________________________________________________________________________________________________________NAME
body - change the body for a class method/proc
SYNOPSIS
itcl::body className::function args body
_________________________________________________________________DESCRIPTION
The body command is used outside of an [incr Tcl] class definition to define or redefine the body of a class method or proc. This facility
allows a class definition to have separate "interface" and "implementation" parts. The "interface" part is a class command with declara-
tions for methods, procs, instance variables and common variables. The "implementation" part is a series of body and configbody commands.
If the "implementation" part is kept in a separate file, it can be sourced again and again as bugs are fixed, to support interactive devel-
opment. When using the "tcl" mode in the emacs editor, the "interface" and "implementation" parts can be kept in the same file; as bugs
are fixed, individual bodies can be highlighted and sent to the test application.
The name "className::function" identifies the method/proc being changed.
If an args list was specified when the function was defined in the class definition, the args list for the body command must match in mean-
ing. Variable names can change, but the argument lists must have the same required arguments and the same default values for optional
arguments. The special args argument acts as a wildcard when included in the args list in the class definition; it will match zero or more
arguments of any type when the body is redefined.
If the body string starts with "@", it is treated as the symbolic name for a C procedure. The args list has little meaning for the C pro-
cedure, except to document the expected usage. (The C procedure is not guaranteed to use arguments in this manner.) If body does not
start with "@", it is treated as a Tcl command script. When the function is invoked, command line arguments are matched against the args
list, and local variables are created to represent each argument. This is the usual behavior for a Tcl-style proc.
Symbolic names for C procedures are established by registering procedures via Itcl_RegisterC(). This is usually done in the Tcl_AppInit()
procedure, which is automatically called when the interpreter starts up. In the following example, the procedure My_FooCmd() is registered
with the symbolic name "foo". This procedure can be referenced in the body command as "@foo".
int
Tcl_AppInit(interp)
Tcl_Interp *interp; /* Interpreter for application. */
{
if (Itcl_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}
if (Itcl_RegisterC(interp, "foo", My_FooCmd) != TCL_OK) {
return TCL_ERROR;
}
}
EXAMPLE
In the following example, a "File" class is defined to represent open files. The method bodies are included below the class definition via
the body command. Note that the bodies of the constructor/destructor must be included in the class definition, but they can be redefined
via the body command as well.
itcl::class File {
private variable fid ""
constructor {name access} {
set fid [open $name $access]
}
destructor {
close $fid
}
method get {}
method put {line}
method eof {}
}
itcl::body File::get {} {
return [gets $fid]
}
itcl::body File::put {line} {
puts $fid $line
}
itcl::body File::eof {} {
return [::eof $fid]
}
#
# See the File class in action:
#
File x /etc/passwd "r"
while {![x eof]} {
puts "=> [x get]"
}
itcl::delete object x
KEYWORDS
class, object, procedure
itcl 3.0 body(n)