Clearing an Existing Hash File

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Hi Shuan,

Try using DSEXECUTE to execute the following command: CLEAR.FILE hashedfilename

The code would look like:

CALL DSEXECUTE("CLEAR.FILE hashedfilename","UV",...)

Regards,
Anthony.

--- "Jackson, Shaun" wrote: > Hello,
>
> I am after advice on exactly how to Clear the contents of a hash file,
> in universe code.
>
> The scenario is;
>
> I receive data daily, which is inserted into a hash file daily. At
> the end of the week, the data in this hash file is summed and
> outputted. I need this hash file to be cleared after this in
> preparation for the next weeks data.
>
> Any advice, code samples etc would be much appreciated!!!
>
> Thanks
>
>
> Shaun Jackson (B. Comp Monash)
> IT Consultant
>
> Black Diamond
> T e c h n o l o g i e s
> Level 3, 1 Southbank Boulevard,
> Southbank, Victoria 3006
>


_____________________________________________________________________________
http://store.yahoo.com.au - Yahoo! Store
- Its time you had your business online!
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

The command you need is CLEAR.FILE hashedfilename (this is not SQL, so does not take a trailing semi-colon).

You could implement it via an after-job subroutine (ExecTCL with the command as the Input Value), or you could execute the command from job control code via DSExecute. For example Call DSExecute("UV", "CLEAR.FILE hashedfilename", Output, ExitStatus)


-----Original Message-----
From: Jackson, Shaun [mailto:Shaun.Jackson@team.telstra.com]
Sent: Monday, 23 April 2001 13:16
To: informix-datastage@oliver.com
Subject: Clearing an Existing Hash File


Hello,

I am after advice on exactly how to Clear the contents of a hash file, in universe code.

The scenario is;

I receive data daily, which is inserted into a hash file daily. At the end of the week, the data in this hash file is summed and outputted. I need this hash file to be cleared after this in preparation for the next weeks data.

Any advice, code samples etc would be much appreciated!!!

Thanks


Shaun Jackson (B. Comp Monash)
IT Consultant

Black Diamond
T e c h n o l o g i e s
Level 3, 1 Southbank Boulevard,
Southbank, Victoria 3006
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

thank you for your response


Shaun Jackson (B. Comp Monash)
IT Consultant

Black Diamond
T e c h n o l o g i e s
Level 3, 1 Southbank Boulevard,
Southbank, Victoria 3006
E-mail: shaun.jackson@bdt.com.au
Telephone: (03) 9686 - 0055
Facsimile: (03) 9696 - 6335
Mobile: 0412 - 785 - 846
Telstra Email: shaun.jackson@team.telstra.com
Telstra Telephone: (03) 9256 5931

> -----Original Message-----
> From: Ray Wurlod [SMTP:ray.wurlod@Informix.Com]
> Sent: Monday, 23 April 2001 3:29 pm
> To: informix-datastage@oliver.com
> Subject: RE: Clearing an Existing Hash File
>
> The command you need is CLEAR.FILE hashedfilename (this is not SQL, so
> does not take a trailing semi-colon).
>
> You could implement it via an after-job subroutine (ExecTCL with the
> command as the Input Value), or you could execute the command from job
> control code
> via DSExecute. For example
> Call DSExecute("UV", "CLEAR.FILE hashedfilename", Output, ExitStatus)
>
>
> -----Original Message-----
> From: Jackson, Shaun [mailto:Shaun.Jackson@team.telstra.com]
> Sent: Monday, 23 April 2001 13:16
> To: informix-datastage@oliver.com
> Subject: Clearing an Existing Hash File
>
>
> Hello,
>
> I am after advice on exactly how to Clear the contents of a hash file,
> in universe code.
>
> The scenario is;
>
> I receive data daily, which is inserted into a hash file daily. At
> the end of the week, the data in this hash file is summed and
> outputted. I need this hash file to be cleared after this in
> preparation for the next weeks data.
>
> Any advice, code samples etc would be much appreciated!!!
>
> Thanks
>
>
> Shaun Jackson (B. Comp Monash)
> IT Consultant
>
> Black Diamond
> T e c h n o l o g i e s
> Level 3, 1 Southbank Boulevard,
> Southbank, Victoria 3006
>
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Clearing an Existing Hash File

Post by admin »

In the command;

Call DSExecute("UV", "CLEAR.FILE hashedfilename", Output, ExitStatus)

Is it neccessary to include values for Output, and ExitStatus? What exactly do they mean?


Shaun Jackson (B. Comp Monash)
IT Consultant

Black Diamond
T e c h n o l o g i e s
Level 3, 1 Southbank Boulevard,
Southbank, Victoria 3006
E-mail: shaun.jackson@bdt.com.au
Telephone: (03) 9686 - 0055
Facsimile: (03) 9696 - 6335
Mobile: 0412 - 785 - 846
Telstra Email: shaun.jackson@team.telstra.com
Telstra Telephone: (03) 9256 5931

> -----Original Message-----
> From: Ray Wurlod [SMTP:ray.wurlod@Informix.Com]
> Sent: Monday, 23 April 2001 3:29 pm
> To: informix-datastage@oliver.com
> Subject: RE: Clearing an Existing Hash File
>
> The command you need is CLEAR.FILE hashedfilename (this is not SQL, so
> does not take a trailing semi-colon).
>
> You could implement it via an after-job subroutine (ExecTCL with the
> command as the Input Value), or you could execute the command from job
> control code
> via DSExecute. For example
> Call DSExecute("UV", "CLEAR.FILE hashedfilename", Output, ExitStatus)
>
>
> -----Original Message-----
> From: Jackson, Shaun [mailto:Shaun.Jackson@team.telstra.com]
> Sent: Monday, 23 April 2001 13:16
> To: informix-datastage@oliver.com
> Subject: Clearing an Existing Hash File
>
>
> Hello,
>
> I am after advice on exactly how to Clear the contents of a hash file,
> in universe code.
>
> The scenario is;
>
> I receive data daily, which is inserted into a hash file daily. At
> the end of the week, the data in this hash file is summed and
> outputted. I need this hash file to be cleared after this in
> preparation for the next weeks data.
>
> Any advice, code samples etc would be much appreciated!!!
>
> Thanks
>
>
> Shaun Jackson (B. Comp Monash)
> IT Consultant
>
> Black Diamond
> T e c h n o l o g i e s
> Level 3, 1 Southbank Boulevard,
> Southbank, Victoria 3006
>
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Its necessary to include arguments, since the subroutine takes four arguments (find it in dsdesign.hlp).

The third argument captures the output from the command. Where the command is CLEAR.FILE this is a text string announcing that the file has been cleared. The fourth argument captures the exit status from the command. If a CLEAR.FILE command executes successfully, this value should be zero. Any error will yield a negative number.

-----Original Message-----
From: Jackson, Shaun [mailto:Shaun.Jackson@team.telstra.com]
Sent: Monday, 23 April 2001 13:44
To: informix-datastage@oliver.com
Subject: Clearing an Existing Hash File


In the command;

Call DSExecute("UV", "CLEAR.FILE hashedfilename", Output, ExitStatus)

Is it neccessary to include values for Output, and ExitStatus? What exactly do they mean?


Shaun Jackson (B. Comp Monash)
IT Consultant

Black Diamond
T e c h n o l o g i e s
Level 3, 1 Southbank Boulevard,
Southbank, Victoria 3006
E-mail: shaun.jackson@bdt.com.au
Telephone: (03) 9686 - 0055
Facsimile: (03) 9696 - 6335
Mobile: 0412 - 785 - 846
Telstra Email: shaun.jackson@team.telstra.com
Telstra Telephone: (03) 9256 5931

> -----Original Message-----
> From: Ray Wurlod [SMTP:ray.wurlod@Informix.Com]
> Sent: Monday, 23 April 2001 3:29 pm
> To: informix-datastage@oliver.com
> Subject: RE: Clearing an Existing Hash File
>
> The command you need is CLEAR.FILE hashedfilename (this is not SQL, so
> does not take a trailing semi-colon).
>
> You could implement it via an after-job subroutine (ExecTCL with the
> command as the Input Value), or you could execute the command from job
> control code
> via DSExecute. For example
> Call DSExecute("UV", "CLEAR.FILE hashedfilename", Output, ExitStatus)
>
>
> -----Original Message-----
> From: Jackson, Shaun [mailto:Shaun.Jackson@team.telstra.com]
> Sent: Monday, 23 April 2001 13:16
> To: informix-datastage@oliver.com
> Subject: Clearing an Existing Hash File
>
>
> Hello,
>
> I am after advice on exactly how to Clear the contents of a hash file,
> in universe code.
>
> The scenario is;
>
> I receive data daily, which is inserted into a hash file daily. At
> the end of the week, the data in this hash file is summed and
> outputted. I need this hash file to be cleared after this in
> preparation for the next weeks data.
>
> Any advice, code samples etc would be much appreciated!!!
>
> Thanks
>
>
> Shaun Jackson (B. Comp Monash)
> IT Consultant
>
> Black Diamond
> T e c h n o l o g i e s
> Level 3, 1 Southbank Boulevard,
> Southbank, Victoria 3006
>
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Shaun,
you have to specify the 2 varibles: Output, that is the command output, and ExitStatus, the status exit code of the command.

Enjoi

Riccardo Tani
Staff Consultant
Unita Servizi alle Imprese
Datamat, Enabling Your Future
Rome, Italy

----- Original Message -----
From: "Jackson, Shaun"
To:
Sent: Monday, April 23, 2001 7:44 AM
Subject: Clearing an Existing Hash File


> In the command;
>
> Call DSExecute("UV", "CLEAR.FILE hashedfilename", Output, ExitStatus)
>
> Is it neccessary to include values for Output, and ExitStatus? What
exactly
> do they mean?
>
>
> Shaun Jackson (B. Comp Monash)
> IT Consultant
>
> Black Diamond
> T e c h n o l o g i e s
> Level 3, 1 Southbank Boulevard,
> Southbank, Victoria 3006
> E-mail: shaun.jackson@bdt.com.au
> Telephone: (03) 9686 - 0055
> Facsimile: (03) 9696 - 6335
> Mobile: 0412 - 785 - 846
> Telstra Email: shaun.jackson@team.telstra.com
> Telstra Telephone: (03) 9256 5931
>
> > -----Original Message-----
> > From: Ray Wurlod [SMTP:ray.wurlod@Informix.Com]
> > Sent: Monday, 23 April 2001 3:29 pm
> > To: informix-datastage@oliver.com
> > Subject: RE: Clearing an Existing Hash File
> >
> > The command you need is CLEAR.FILE hashedfilename (this is not SQL,
> > so does not take a trailing semi-colon).
> >
> > You could implement it via an after-job subroutine (ExecTCL with the
> > command as the Input Value), or you could execute the command from
> > job control code
> > via DSExecute. For example
> > Call DSExecute("UV", "CLEAR.FILE hashedfilename", Output, ExitStatus)
> >
> >
> > -----Original Message-----
> > From: Jackson, Shaun [mailto:Shaun.Jackson@team.telstra.com]
> > Sent: Monday, 23 April 2001 13:16
> > To: informix-datastage@oliver.com
> > Subject: Clearing an Existing Hash File
> >
> >
> > Hello,
> >
> > I am after advice on exactly how to Clear the contents of a hash
> > file,
in
> > universe code.
> >
> > The scenario is;
> >
> > I receive data daily, which is inserted into a hash file daily. At
> > the end of the week, the data in this hash file is summed and
> > outputted. I need this hash file to be cleared after this in
> > preparation for the next
weeks
> > data.
> >
> > Any advice, code samples etc would be much appreciated!!!
> >
> > Thanks
> >
> >
> > Shaun Jackson (B. Comp Monash)
> > IT Consultant
> >
> > Black Diamond
> > T e c h n o l o g i e s
> > Level 3, 1 Southbank Boulevard,
> > Southbank, Victoria 3006
> >
>
Locked