Page 1 of 1

TRIPLET FILE CREATION

Posted: Sun Jun 17, 2007 7:46 pm
by saugat_1982
Hi all

My requirment is as follows

I have a seq file (let's say name of the file is "customer.dat"
I wanna make 3 files from this file as follows :
1.customer.dat ----- which will contain all data of the parent file
2. customer.ctl------ which will contain record count , time of file generation,name of the parentfile.
3.customer.eot----- to indicate the end of transcation of dat file.

Can any one please suggest me , how can i design a job in DS7.5.2 to fulfilling this requirement ?

Thanks in Advance

Posted: Sun Jun 17, 2007 7:54 pm
by ArndW
Are you creating this "customer.dat" file in your DataStage job? Also, is this Server (as indicated by forum) or Parallel (as indicated by post).

Posted: Sun Jun 17, 2007 7:57 pm
by saugat_1982
Sorry for posting in section;

It will be a PX job in DataStage 7.5.2

Posted: Sun Jun 17, 2007 8:04 pm
by ArndW
And is the PX system creating this customer.dat file or is it coming from somewhere else? If from somewhere else, how are you going to get the information about "time of file creation" and how do you define end-of-transaction?

Posted: Sun Jun 17, 2007 8:09 pm
by saugat_1982
I will create the Dat file in another PX job from some VIEWS of one Teradata Table and will be stored in my UNIX home , so from there we can get the TOC (time of creation ) of the dat file.

Posted: Sun Jun 17, 2007 8:17 pm
by ArndW
In this case I would prefer using simple UNIX commands to put together your .ctl and .eot files instead of writing PX jobs or using DS BASIC code to do it. It is simpler and easier to maintain that way.

Posted: Sun Jun 17, 2007 8:30 pm
by ray.wurlod
Use a Routine activity in a job sequence. This routine uses DataStage BASIC. Within this language the STATUS statement can retrieve the date/time created or modified, file size and other items of information. The routine can also execute a wc -l command to determine the line count. And, of course, the routine can write the information to the required files.

Posted: Sun Jun 17, 2007 8:57 pm
by saugat_1982
Thanks Very Much