find file size greater than 1 GB

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

find file size greater than 1 GB

Post by pavankatra »

Hi,
i want to find file size greater than 0 kb

if the file size is greater than 0kb then only i want to send that file as an attachment.

my server is in windows environment.

please help me on this.

Thanks in advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can do this in a Routine activity - check out OPENSEQ and SYSTEM() in the DataStage BASIC manual.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You can call an ls command and obtain the file size.

This value can be used in a nested condition to determine the flow.
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

Post by pavankatra »

Sainath.Srinivasan wrote:You can call an ls command and obtain the file size.

This value can be used in a nested condition to determine the flow. ...
Thanks for your replies

anyway i got the solution

find d:/new.txt -type f -size +memorysize

Thanks for all your replies.
Post Reply