TRIPLET FILE CREATION

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
saugat_1982
Participant
Posts: 29
Joined: Mon Nov 20, 2006 7:17 am
Location: Melbourne

TRIPLET FILE CREATION

Post 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
Saugat Dey
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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).
saugat_1982
Participant
Posts: 29
Joined: Mon Nov 20, 2006 7:17 am
Location: Melbourne

Post by saugat_1982 »

Sorry for posting in section;

It will be a PX job in DataStage 7.5.2
Saugat Dey
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
saugat_1982
Participant
Posts: 29
Joined: Mon Nov 20, 2006 7:17 am
Location: Melbourne

Post 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.
Saugat Dey
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
saugat_1982
Participant
Posts: 29
Joined: Mon Nov 20, 2006 7:17 am
Location: Melbourne

Post by saugat_1982 »

Thanks Very Much
Saugat Dey
Post Reply