Regarding FILE SIZE...ANY IN BUILD FUNCTION THERE

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
devaraj4u
Participant
Posts: 32
Joined: Mon Nov 11, 2002 12:32 am
Location: Schaumburg,Chicago

Regarding FILE SIZE...ANY IN BUILD FUNCTION THERE

Post by devaraj4u »

Hi All,

I am Opening a text file("Rates.txt") using the
openseq to and we had Error handling routine also like On Error etc etc... and closing the file can be handled by Close

Pollfilename = "D:RatesfilesRates.txt"

eg Openseq pollfilename to pollfilevar

If i able to open the file successfully i want to check the for file size should not be "Zero" then i want to proceed with otherwise warning stating "File size is Zeri"...is there any built in Routine like fsize(filevar) available in Datastage....

Please guide me...

Ray please help me...how to find a filesize in
(low level file handling) and command / file handling function...


Thanks & Regards,
K.S.Rajan.
SCB,Singapore.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

K.S.Rajan


file = "KDBPOpenSeqSize.uvb"
openseq file to SeqFile else stop
status FileInfo from SeqFile else stop
FileSize = FileInfo
print FileSize

Kim.


Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can't help any more than that!
Kim's is exactly the answer I'd have given. [8D]
Except, maybe, the STOP statements.

Check out the STATUS statement (not the STATUS function) in the BASIC manual (in the Docs folder where you installed DatatStage clients).

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

K.S.Rajan

Ray is right. Please don't leave the stops in the code. I make my code brief and to the point so it is easy to understand. In no way would I implement simple code like that.

Kim.

Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com
devaraj4u
Participant
Posts: 32
Joined: Mon Nov 11, 2002 12:32 am
Location: Schaumburg,Chicago

Post by devaraj4u »

Dear Kim & Ray,

Thanks a lot for your help...Exactly the Code is very much useful...i used it in my program....Thanks a lot...Have a nice weekend...

Thanks & Regards,
K.S.Rajan.
Post Reply