Another good point. I guess the modification that would be better to make would be a brief instruction line then...
I read the TIU manual about HFS uploads, and there was no example of using the HSS system. If I could put out one plea to programmers.... try to make your code user friendly!!! Kevin --- Marianne Susaanti Follingstad <[EMAIL PROTECTED]> wrote: > You could have several HFS type devices in your > device file, including one > setup with the info you standardly use in a given > situation (possibly > including the file name), so that you might want to > specify which HFS type > Device to use. > > Marianne Follingstad > > Kevin Toppenberg wrote: > > > Touche' (good point) Lloyd.... > > > > I guess this was an example of a system not being > user > > friendly enough. I tried to figure out how to use > it > > that other way, got frustrated and rewrote it. > > > > It seems that we got to that point in the code > because > > the TIU parameters specified HFS upload. So why > it > > asking if you want HFS again? That should be > > automatic. > > > > My code (in the GetFName function) does allow for > > default upload directory to be specified, and for > a > > quick directory listing if one can't remember the > file > > name. > > > > Kevin > > > > --- Lloyd Milligan <[EMAIL PROTECTED]> wrote: > > > > > Kevin, The original code asked for a device, > i.e. a > > > lookup value in the > > > DEVICE file, such as "HFS". The prompt for file > > > comes later, provided the > > > ASK HOST FILE field is valued YES. Doesn't > $$FTG > > > followed by a loop to > > > $$STRIP the data in effect traverse the data > twice, > > > as opposed to once in > > > the original code? > > > > > > Lloyd > > > > > > ----- Original Message ----- > > > From: "Kevin Toppenberg" <[EMAIL PROTECTED]> > > > To: <hardhats-members@lists.sourceforge.net> > > > Sent: Wednesday, February 16, 2005 1:14 AM > > > Subject: Re: [Hardhats-members] Using ^%ZIS to > > > select input file > > > > > > > > > > Well, its 1am, and I'm up way too late... > > > > > > > > I decided that I entirely didn't like the way > the > > > HFS > > > > upload was being done in this function, so I > have > > > > rewritten it. It now uses $$FTG^%ZISH to load > the > > > HFS > > > > file, rather than opening an IO channel > through a > > > > device, and then reading the file in line by > line. > > > > > > > > Here is the code if anyone is interested.: > > > > > > > > Here is the change to TIUUPLD.m > > > > ======================================== > > > > HFS(DA) ; Read HFS file > > > > ;"---------------------- //kt > > > > ;"K. Toppenberg Modification > > > > do LoadTIUBuf^TMGMISC(DA) > > > > quit > > > > > > > > ======================================== > > > > Here is LoadTIUBuf^TMGMISC > > > > > > > > LoadTIUBuf(DA) > > > > ;"Purpose: to ask user for filename, and then > load > > > > this into a > > > > ;" TIU buffer (that already has been > > > created) > > > > ;"Input: DA : the IEN (record number) > in > > > file > > > > ^TIU(8925.2), i.e. > > > > ;" in file TIU UPLOAD BUFFER, that the > file > > > > is > > > > ;" to be loaded into. > > > > ;"Results: none > > > > > > > > if '$data(TIUPRM0)!'$data(TIUPRM1) do > > > SETPARM^TIULE > > > > write @IOF > > > > do JUSTIFY^TIUU($$TITLE^TIUU("ASCII > > > > UPLOAD"),"C") > > > > > > > > new FPName > > > > new result set result=0 > > > > set FPName=$$GetFName^TMGIOUTL("Enter > name > > > of > > > > file containing transcription","/tmp/") > > > > if FPName'="" do > > > > . new name,path,BuffP > > > > . do > > > > SplitFNamePath^TMGIOUTL(FPName,.path,.name) > > > > . if ($get(path)="")!($get(name)="") > quit > > > > . set > > > BuffP="^TIU(8925.2,"_DA_",""TEXT"",1,0)" > > > > . if $$FTG^%ZISH(path,name,BuffP,4) do > > > > . . set result=1 > > > > . . new MaxLine set > > > > MaxLine=$order(^TIU(8925.2,DA,"TEXT",""),-1) > > > > . . set > > > > > > > > > > ^TIU(8925.2,DA,"TEXT",0)="^^"_+MaxLine_"^"_+MaxLine_"^"_DT_"^^^^" > > > > . . new index set > > > > index=$order(^TIU(8925.2,DA,"TEXT",0)) > > > > . . for do quit:index="" > > > > . . . if index="" quit > > > > . . . new s set > > > > > s=$$STRIP^TIUUPLD(^TIU(8925.2,DA,"TEXT",index,0)) > > > > . . . set > ^TIU(8925.2,DA,"TEXT",index,0)=s > > > > . . . set > > > > index=$order(^TIU(8925.2,DA,"TEXT",index)) > > > > > > > > if result=0 do > > > > . write "Unsuccessful upload.",! > > > > quit > > > > ======================================== > > > > > > > > I reference a few extra functions I can get > anyone > > > > that wants them. > > > > > > > > Kevin > > > > > > > > > > > > > > > > > > > > --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote: > > > > > > > >> I'm having a hard time with my transcription > > > upload > > > >> system. At first the KERMIT upload system > built > > > >> into > > > >> the TIU system would work after 1-4 tries. > But > > > >> today > > > >> it's absolutely refusing to upload a text > file. > > > >> > > > >> So I have tried to use the other built-in > system: > > > >> HFS. > > > >> > > > >> This is a screen log of what I see when I try > > > this > > > >> method: > > > >> ------------------------ > > > >> A S C I I U P L O A D > > > >> > > > >> Select Host File: > > > >> > > > >> DEVICE: HOME// /tmp/thwing2-11-2005.txt > [DEVICE > > > >> DOES > > > >> NOT EXIST] > > > >> DEVICE: HOME// > > > >> > > > >> ------------------------ > > > >> > > > >> Here is the relevant portion of the code > > > (TIUUPLD.m) > > > >> > > > >> HFS(DA) ; Read HFS file > > > >> N TIUI,X > > > >> I '$D(TIUPRM0)!'$D(TIUPRM1) D SETPARM^TIULE > > > >> W @IOF D JUSTIFY^TIUU($$TITLE^TIUU("ASCII > > > >> UPLOAD"),"C") > === message truncated === __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Hardhats-members mailing list Hardhats-members@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hardhats-members