How can I get image or voice clip size?

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

How can I get image or voice clip size?

Post by stevec »

for saving to blob with size info field.

Is there an easier way than doing a directory list )ov_file_service get_dir) and locate fiel in list which has file size?
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: How can I get image or voice clip size?

Post by MarkDuignan »

I can't think of any other was in RDMLX.

However - you might find some other solutions to retrieve an IFS file size in the general IBM i community forums?
If you can wrap the logic up in a program you should be able to call it from your RDMLX code.
There is a standard IBM API called stat() or fstat() https://publib.boulder.ibm.com/infocent ... Ffstat.htm
that can return this information. You could call that from a very small CL program that binds to I think.

What OS/400 (iOS) version are you using?
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: How can I get image or voice clip size?

Post by stevec »

I created an rpg procedure (and wrapper for lansa since it does not support them) for stat and it works for files size.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: How can I get image or voice clip size?

Post by MarkDuignan »

is it possible to post the code - it would probably be useful to other forum users.
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: How can I get image or voice clip size?

Post by stevec »

ifsgetsiz_rpglemodule.txt
(1.58 KiB) Downloaded 244 times
getifssizw_rpglewrapper.txt
(1.39 KiB) Downloaded 261 times
ifsgetsiz_rpgleproto.txt
(885 Bytes) Downloaded 237 times
http://www.scottklement.com/rpg/ifs.html
for ifsio_h include
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: How can I get image or voice clip size?

Post by MarkDuignan »

Thanks for that.
Here's another useful IFS file program I encountered today - http://www.itjungle.com/fhg/fhg051414-story02.html
Post Reply