Re: [U2] Sequential Files Question
An interesting point about Windows 2008 R2 (it's only 64 bit) is the replacement backup utility cannot both save from a particular drive and store the backup to the same drive. So, if I were crazy enough to build a server with just a "C:" drive I would have to set the target for the backup file to a network share, as I can't store it on the "C:" drive (because I'm saving data from the "C:" drive. This pretty much indicates that one needs at least three drives for a Windows Server; one for the O/S, one for the backup file, and one to store all the data that needs saving. There didn't seem to be too much difference in backup speed using a network share as a target vs a local share, but one would think there would. Go figure... Bill Colin Alfke said the following on 9/9/2010 1:48 PM: Unfortunately, I haven't had a chance to play with it. It just looked like it treated C:\ like XP treats c:\windows\system and warns you away from it. I was wondering if it would prevent you from creating directories as well as files. I would have rather they fixed all of the tools to work with spaces - but then again - I still can't make myself create anything with a space in it. My current bear is Outlook keeping the .ost file in a hidden directory under Documents and Settings. My backup software seems to be smart enough to find the directory so that I can check it to be backed up, but not smart enough that I can find it when I want to restore!?!?!? Colin -Original Message- From: Bill Haskett Colin: I wonder if Windows 7 complains about any writes to the "C:\" drive. This would be a good thing, but still, some applications install into "C:\Program Files (x86)", so that directory must allow writes along with "C:\ProgramData" (notice how they seem to have removed their heads from that dark space by eliminating spaces in one of their primary directories in "C:"). I don't seem to have any problems writing to "D:" or beyond. Bill ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
Unfortunately, I haven't had a chance to play with it. It just looked like it treated C:\ like XP treats c:\windows\system and warns you away from it. I was wondering if it would prevent you from creating directories as well as files. I would have rather they fixed all of the tools to work with spaces - but then again - I still can't make myself create anything with a space in it. My current bear is Outlook keeping the .ost file in a hidden directory under Documents and Settings. My backup software seems to be smart enough to find the directory so that I can check it to be backed up, but not smart enough that I can find it when I want to restore!?!?!? Colin -Original Message- From: Bill Haskett Colin: I wonder if Windows 7 complains about any writes to the "C:\" drive. This would be a good thing, but still, some applications install into "C:\Program Files (x86)", so that directory must allow writes along with "C:\ProgramData" (notice how they seem to have removed their heads from that dark space by eliminating spaces in one of their primary directories in "C:"). I don't seem to have any problems writing to "D:" or beyond. Bill ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
Colin: I wonder if Windows 7 complains about any writes to the "C:\" drive. This would be a good thing, but still, some applications install into "C:\Program Files (x86)", so that directory must allow writes along with "C:\ProgramData" (notice how they seem to have removed their heads from that dark space by eliminating spaces in one of their primary directories in "C:"). I don't seem to have any problems writing to "D:" or beyond. Bill Colin Alfke said the following on 9/9/2010 12:02 PM: The pipe is different. I use it to send output as input to other commands: !LISTUSER | MORE or !LISTUSER | FIND "COLIN" /I But then I've only been really using DOS since 3.11 I've noticed Win 7 hides the root of C:, but I didn't realize that it wouldn't let you create a file. Colin -Original Message- From: Allen Elwood I've been using DOS since 1.0 - forgot all about pipe didn't it used to be | ? btw, even though I'm the admin on my laptop, it will not allow me to even use notepad to save to c:\buddy.txt Must be a new windows 7 thing. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
The pipe is different. I use it to send output as input to other commands: !LISTUSER | MORE or !LISTUSER | FIND "COLIN" /I But then I've only been really using DOS since 3.11 I've noticed Win 7 hides the root of C:, but I didn't realize that it wouldn't let you create a file. Colin -Original Message- From: Allen Elwood I've been using DOS since 1.0 - forgot all about pipe didn't it used to be | ? btw, even though I'm the admin on my laptop, it will not allow me to even use notepad to save to c:\buddy.txt Must be a new windows 7 thing. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
I've been using DOS since 1.0 - forgot all about pipe didn't it used to be | ? btw, even though I'm the admin on my laptop, it will not allow me to even use notepad to save to c:\buddy.txt Must be a new windows 7 thing. On 9/9/2010 10:50 AM, Colin Alfke wrote: If you had the proper permissions you would have had a buddy.txt file with: ECHO is on. in the file. The '>' redirects the output to the file indicated (creates it if it doesn't exist or overwrites it if it does). I use it to create a log from a batch file: Date /t> batchfile.log Time /t>> batchfile.log The '>>' will append the output to the file. So, in the example he would likely want to do the WEOFSEQ SEQFILE to reset the record (although that will create the file as well so you might as well just do that...) Now that we're getting picky - the ABORTM statement doesn't exist in UniData either so you would need to use ABORT or STOP. Hth Colin Alfke Calgary Canada -Original Message- From: Allen Elwood RR How does this create a file? I've always code similar to the method David Green showed, since that works on all pick flavors instead of having to change my code every time I move to a different system. C:\Users\AllenElwood>help echo Displays messages, or turns command-echoing on or off. ECHO [ON | OFF] ECHO [message] Type ECHO without parameters to display the current echo setting. C:\>echo>c:\buddy.txt Access is denied. On 9/9/2010 9:47 AM, Rex Gozar wrote: OPENSEQ PATH TO SEQFILE THEN WEOFSEQ SEQFILE ON ERROR ABORTM "WEOFSEQ FAILED!" END END ELSE * instead of CREATE statement (on Windows) PCPERFORM "echo>":PATH OPENSEQ PATH TO SEQFILE ELSE ABORTM "OPENSEQ FAILED!" END END ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
If you had the proper permissions you would have had a buddy.txt file with: ECHO is on. in the file. The '>' redirects the output to the file indicated (creates it if it doesn't exist or overwrites it if it does). I use it to create a log from a batch file: Date /t > batchfile.log Time /t >> batchfile.log The '>>' will append the output to the file. So, in the example he would likely want to do the WEOFSEQ SEQFILE to reset the record (although that will create the file as well so you might as well just do that...) Now that we're getting picky - the ABORTM statement doesn't exist in UniData either so you would need to use ABORT or STOP. Hth Colin Alfke Calgary Canada -Original Message- From: Allen Elwood RR How does this create a file? I've always code similar to the method David Green showed, since that works on all pick flavors instead of having to change my code every time I move to a different system. C:\Users\AllenElwood>help echo Displays messages, or turns command-echoing on or off. ECHO [ON | OFF] ECHO [message] Type ECHO without parameters to display the current echo setting. C:\>echo>c:\buddy.txt Access is denied. On 9/9/2010 9:47 AM, Rex Gozar wrote: > OPENSEQ PATH TO SEQFILE THEN >WEOFSEQ SEQFILE ON ERROR > ABORTM "WEOFSEQ FAILED!" >END > END ELSE >* instead of CREATE statement (on Windows) >PCPERFORM "echo>":PATH >OPENSEQ PATH TO SEQFILE ELSE > ABORTM "OPENSEQ FAILED!" >END > END ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
Use echo . to get just a carriage return into the file. Note that you don't have permissions to write the file, therefore any attempt to create it from BASIC will also fail. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Allen Elwood RR Sent: Thursday, September 09, 2010 10:08 AM To: U2 Users List Subject: Re: [U2] Sequential Files Question How does this create a file? I've always code similar to the method David Green showed, since that works on all pick flavors instead of having to change my code every time I move to a different system. C:\Users\AllenElwood>help echo Displays messages, or turns command-echoing on or off. ECHO [ON | OFF] ECHO [message] Type ECHO without parameters to display the current echo setting. C:\>echo>c:\buddy.txt Access is denied. On 9/9/2010 9:47 AM, Rex Gozar wrote: > OPENSEQ PATH TO SEQFILE THEN >WEOFSEQ SEQFILE ON ERROR > ABORTM "WEOFSEQ FAILED!" >END > END ELSE >* instead of CREATE statement (on Windows) >PCPERFORM "echo>":PATH >OPENSEQ PATH TO SEQFILE ELSE > ABORTM "OPENSEQ FAILED!" >END > END > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
How does this create a file? I've always code similar to the method David Green showed, since that works on all pick flavors instead of having to change my code every time I move to a different system. C:\Users\AllenElwood>help echo Displays messages, or turns command-echoing on or off. ECHO [ON | OFF] ECHO [message] Type ECHO without parameters to display the current echo setting. C:\>echo>c:\buddy.txt Access is denied. On 9/9/2010 9:47 AM, Rex Gozar wrote: OPENSEQ PATH TO SEQFILE THEN WEOFSEQ SEQFILE ON ERROR ABORTM "WEOFSEQ FAILED!" END END ELSE * instead of CREATE statement (on Windows) PCPERFORM "echo>":PATH OPENSEQ PATH TO SEQFILE ELSE ABORTM "OPENSEQ FAILED!" END END ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
OPENSEQ PATH TO SEQFILE THEN WEOFSEQ SEQFILE ON ERROR ABORTM "WEOFSEQ FAILED!" END END ELSE * instead of CREATE statement (on Windows) PCPERFORM "echo>":PATH OPENSEQ PATH TO SEQFILE ELSE ABORTM "OPENSEQ FAILED!" END END ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
Al; If you don't want to create the extra VOC entry you can put the entire path in the OPENSEQ statement: OPENSEQ 'C:\OUTPUT\APCHECKS999' TO OUTFILE THEN Or FPATH = 'C:\OUTPUT\' FNAME = 'APCHECKS' OPENSEQ FPATH:FNAME TO OUTFILE THEN I just find the VOC method easier as I have a lot of programs and the path can be quite different Hth Colin Alfke Calgary, Canada -Original Message- From: Al DeWitt This is what finally worked. I was hoping to do it w/o having to create a VOC entry, but that was not to be. Thank you all for your help. Al DeWitt -Original Message- From: Colin Alfke Al; I use the following code: OPENSEQ 'OUTPUT.FILE', 'APCHECKS' TO OUTFILE THEN CRT 'APCHECKS ALREADY EXISTS' STOP END * code to build each line goes here MORE.DATA = 1 LOOP WHILE MORE.DATA DO LINE = 'data' 'L#9':MORE.DATA 'L#25':'still more data' 'L#20' WRITESEQ LINE APPEND ON OUTFILE ELSE CRT 'NOT AT END OF APCHECKS' MORE.DATA += 1 IF MORE.DATA >= 25 THEN MORE.DATA = 0 REPEAT CLOSESEQ OUTFILE Hth Colin Alfke Calgary, Canada -Original Message- From: Al DeWitt I GET THE FOLLOWING MESSAGE [FATAL ERROR: - Cannot open file C:\OUTPUT\APCHECKS1002] and I'm sent to the colon prompt. Al DeWitt -Original Message- From: Al DeWitt I forgot to mention that I'm on Windows. My output path is: C:\OUTPUT\ My file name isAPCHECKS where is a counter that gets incremented each time the program is run. FNAME would be C:\OUTPUT\APCHECKS so that my statement would read: OPENSEQ FNAME TO OUTFILE... However, since APCHECKS would be unique each time it doesn't exist. BTW when I try to display OUTFILE it gives me an Unitialized Variable, zero assumed error. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
because CREATE doesn't exist in Unidata, at least not at my release. On 9/9/2010 9:05 AM, Rex Gozar wrote: Al, Look at the CREATE statement in your documentation. Works for both Windows and *nix. Frankly, I'm amazed how complicated people are making this. OPENSEQ PATH TO SEQFILE THEN WEOFSEQ SEQFILE ON ERROR ABORTM "WEOFSEQ FAILED!" END END ELSE CREATE SEQFILE ELSE ABORTM "OPENSEQ AND CREATE FAILED!" END END ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
Al, Look at the CREATE statement in your documentation. Works for both Windows and *nix. Frankly, I'm amazed how complicated people are making this. OPENSEQ PATH TO SEQFILE THEN WEOFSEQ SEQFILE ON ERROR ABORTM "WEOFSEQ FAILED!" END END ELSE CREATE SEQFILE ELSE ABORTM "OPENSEQ AND CREATE FAILED!" END END ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
This is what finally worked. I was hoping to do it w/o having to create a VOC entry, but that was not to be. Thank you all for your help. Al DeWitt -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Colin Alfke Sent: Wednesday, September 08, 2010 11:57 PM To: 'U2 Users List' Subject: Re: [U2] Sequential Files Question Al; I use the following code: OPENSEQ 'OUTPUT.FILE', 'APCHECKS' TO OUTFILE THEN CRT 'APCHECKS ALREADY EXISTS' STOP END * code to build each line goes here MORE.DATA = 1 LOOP WHILE MORE.DATA DO LINE = 'data' 'L#9':MORE.DATA 'L#25':'still more data' 'L#20' WRITESEQ LINE APPEND ON OUTFILE ELSE CRT 'NOT AT END OF APCHECKS' MORE.DATA += 1 IF MORE.DATA >= 25 THEN MORE.DATA = 0 REPEAT CLOSESEQ OUTFILE Where OUTPUT.FILE is a VOC item (which means I can change the location of the file without recompiling/changing code): DIR C:\OUTPUT D_VOC Using the "THEN" construct means the program will stop if that item already exists so you won't overwrite any existing data. Technically, the file won't actually exist until you do the WRITESEQ, but it won't matter that it won't already exist, it will create it. You can't really deal with OUTFILE as a variable - it's really a (type of) file handle. The WRITESEQ will fly through the file - you don't have to worry about creating a large array - it will just keep writing until it hits the limit (not sure if it's the OS limit or UniData's 2GB limit). Hth Colin Alfke Calgary, Canada -Original Message- From: Al DeWitt I GET THE FOLLOWING MESSAGE [FATAL ERROR: - Cannot open file C:\OUTPUT\APCHECKS1002] and I'm sent to the colon prompt. Al DeWitt -Original Message- From: Dan McGrath If you run this code: OPENSEQ FNAME TO OUTFILE ON ERROR STOP 'FATAL ERROR: - Cannot open file ':FNAME END THEN STOP 'FATAL ERROR: - Already exiting file called: ':FNAME END ELSE CRT "FILE OPEN SUCCEEDED!" WRITESEQ "Dummy data" ON OUTFILE THEN NULL END What happens? -Original Message- From: Al DeWitt I forgot to mention that I'm on Windows. My output path is: C:\OUTPUT\ My file name isAPCHECKS where is a counter that gets incremented each time the program is run. FNAME would be C:\OUTPUT\APCHECKS so that my statement would read: OPENSEQ FNAME TO OUTFILE... However, since APCHECKS would be unique each time it doesn't exist. BTW when I try to display OUTFILE it gives me an Unitialized Variable, zero assumed error. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
Here is one approach. OPEN.DIR.FILE:* Open sequential output file DIR.FILE = "_PH_" OPEN DIR.FILE TO F.DIR.FILE THEN DELETE F.DIR.FILE, OUTPUT.NAME CLOSE F.DIR.FILE OPENSEQ DIR.FILE, OUTPUT.NAME TO F.DIR.FILE ELSE IF STATUS() THEN ABORT.FLAG = TRUE MSG = "Can't open ":DIR.FILE:", ":OUTPUT.NAME:" for output." END END END ELSE ABORT.FLAG = TRUE MSG = "Can't open ":DIR.FILE:"!" END RETURN David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Wednesday, September 08, 2010 3:55 PM To: u2-users@listserver.u2ug.org Subject: [U2] Sequential Files Question Unidata 7.1.20 I've never dealt with sequential files, but I have a need to output records to a text file. Each record will be a series of fixed-length fields. Each file will need to be created at the time of opening. The destination will be a Windows folder on one of our servers. I will be using OPENSEQ to open the file. However, since each file needs to be created at time of opening what do I use to create the file? My reading of OPENSEQ doesn't indicate that it will create it automatically if it doesn't exist. Thanks. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
Al, Do the following: OPENSEQ FNAME TO OUTFILE ELSE NULL WEOFSEQ OUTFILE ON ERROR STOPM 'FATAL ERROR: - Cannot write to file ':FNAME Now, you should be able to perform the writes without a problem. By the way, the ON ERROR clause is optional. The WEOFSEQ will either create the file, or write an end of file mark at the end of an existing file, making the file null. If you want to keep the data, if the file exists, then add the WEOFSEQ in an OPENSEQ ELSE condition... but you need to position the pointer to the end of the file or you will be stepping on existing data. Tom RATEX Business Solutions -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Wednesday, September 08, 2010 10:15 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question I GET THE FOLLOWING MESSAGE [FATAL ERROR: - Cannot open file C:\OUTPUT\APCHECKS1002] and I'm sent to the colon prompt. Al DeWitt -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath Sent: Wednesday, September 08, 2010 7:20 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question If you run this code: OPENSEQ FNAME TO OUTFILE ON ERROR STOP 'FATAL ERROR: - Cannot open file ':FNAME END THEN STOP 'FATAL ERROR: - Already exiting file called: ':FNAME END ELSE CRT "FILE OPEN SUCCEEDED!" WRITESEQ "Dummy data" ON OUTFILE THEN NULL END What happens? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 10:03 AM To: U2 Users List Subject: Re: [U2] Sequential Files Question I forgot to mention that I'm on Windows. My output path is: C:\OUTPUT\ My file name isAPCHECKS where is a counter that gets incremented each time the program is run. FNAME would be C:\OUTPUT\APCHECKS so that my statement would read: OPENSEQ FNAME TO OUTFILE... However, since APCHECKS would be unique each time it doesn't exist. BTW when I try to display OUTFILE it gives me an Unitialized Variable, zero assumed error. Al DeWitt -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath Sent: Wednesday, September 08, 2010 6:29 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question Yes, it will. Note: It will drop into the 'ELSE' clause if the file didn't exist to start with. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 8:55 AM To: u2-users@listserver.u2ug.org Subject: [U2] Sequential Files Question Unidata 7.1.20 I've never dealt with sequential files, but I have a need to output records to a text file. Each record will be a series of fixed-length fields. Each file will need to be created at the time of opening. The destination will be a Windows folder on one of our servers. I will be using OPENSEQ to open the file. However, since each file needs to be created at time of opening what do I use to create the file? My reading of OPENSEQ doesn't indicate that it will create it automatically if it doesn't exist. Thanks. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ### The information transmitted in this message and attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. The intended recipient of this e-mail may only use, reproduce, disclose or distribute the information contained in this e-mail and any attached files with the permission of IMB. ### ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users
Re: [U2] Sequential Files Question
On 09/09/10 05:57, Colin Alfke wrote: > Al; > > I use the following code: > > OPENSEQ 'OUTPUT.FILE', 'APCHECKS' TO OUTFILE THEN > CRT 'APCHECKS ALREADY EXISTS' > STOP > END NOTE THE DIFFERENT SYNTAX! Looks like OPENSEQ has multiple syntaxes as everybody else has said OPENSEQ "os pathname" TO ... But I've only ever used the OPENSEQ "uv type 1 file", "record" TO syntax. What happens if you change syntax and try it that way? Cheers, Wol > * code to build each line goes here > MORE.DATA = 1 > LOOP WHILE MORE.DATA DO > LINE = 'data' 'L#9':MORE.DATA 'L#25':'still more data' 'L#20' > WRITESEQ LINE APPEND ON OUTFILE ELSE CRT 'NOT AT END OF APCHECKS' > MORE.DATA += 1 > IF MORE.DATA >= 25 THEN MORE.DATA = 0 > REPEAT > CLOSESEQ OUTFILE > > Where OUTPUT.FILE is a VOC item (which means I can change the location of > the file without recompiling/changing code): > DIR > C:\OUTPUT > D_VOC > > Using the "THEN" construct means the program will stop if that item already > exists so you won't overwrite any existing data. Technically, the file won't > actually exist until you do the WRITESEQ, but it won't matter that it won't > already exist, it will create it. You can't really deal with OUTFILE as a > variable - it's really a (type of) file handle. The WRITESEQ will fly > through the file - you don't have to worry about creating a large array - it > will just keep writing until it hits the limit (not sure if it's the OS > limit or UniData's 2GB limit). > > Hth > Colin Alfke > Calgary, Canada > > -Original Message- > From: Al DeWitt > > I GET THE FOLLOWING MESSAGE [FATAL ERROR: - Cannot open file > C:\OUTPUT\APCHECKS1002] and I'm sent to the colon prompt. > > Al DeWitt > > -Original Message- > From: Dan McGrath > > If you run this code: > > OPENSEQ FNAME TO OUTFILE ON ERROR >STOP 'FATAL ERROR: - Cannot open file ':FNAME END THEN >STOP 'FATAL ERROR: - Already exiting file called: ':FNAME END ELSE >CRT "FILE OPEN SUCCEEDED!" >WRITESEQ "Dummy data" ON OUTFILE THEN NULL END > > What happens? > > > -Original Message- > From: Al DeWitt > > I forgot to mention that I'm on Windows. > > My output path is: C:\OUTPUT\ > My file name isAPCHECKS where is a counter that gets incremented > each time the program is run. > > FNAME would be C:\OUTPUT\APCHECKS so that my statement would read: > OPENSEQ FNAME TO OUTFILE... > > However, since APCHECKS would be unique each time it doesn't exist. > > > BTW when I try to display OUTFILE it gives me an Unitialized Variable, > zero assumed error. > > Al DeWitt > > > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
We use: OPENSEQ FNAME TO FHANDLE ELSE CREATE FHANDLE ELSE STOP Schalk van Zyl Al DeWitt wrote: I GET THE FOLLOWING MESSAGE [FATAL ERROR: - Cannot open file C:\OUTPUT\APCHECKS1002] and I'm sent to the colon prompt. Al DeWitt Schalk van Zyl GWK Beperk Tel+2753 298 8231 Fax+2753 298 2445 Mobile Hierdie e-pos en sy inhoud is onderhewig aan 'n regskennisgewing oor elektroniese pos wat gelees kan word by http://www.gwk.co.za/DisclaimerVrywaring.asp .> -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath Sent: Wednesday, September 08, 2010 7:20 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question If you run this code: OPENSEQ FNAME TO OUTFILE ON ERROR STOP 'FATAL ERROR: - Cannot open file ':FNAME END THEN STOP 'FATAL ERROR: - Already exiting file called: ':FNAME END ELSE CRT "FILE OPEN SUCCEEDED!" WRITESEQ "Dummy data" ON OUTFILE THEN NULL END What happens? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 10:03 AM To: U2 Users List Subject: Re: [U2] Sequential Files Question I forgot to mention that I'm on Windows. My output path is: C:\OUTPUT\ My file name isAPCHECKS where is a counter that gets incremented each time the program is run. FNAME would be C:\OUTPUT\APCHECKS so that my statement would read: OPENSEQ FNAME TO OUTFILE... However, since APCHECKS would be unique each time it doesn't exist. BTW when I try to display OUTFILE it gives me an Unitialized Variable, zero assumed error. Al DeWitt -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath Sent: Wednesday, September 08, 2010 6:29 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question Yes, it will. Note: It will drop into the 'ELSE' clause if the file didn't exist to start with. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 8:55 AM To: u2-users@listserver.u2ug.org Subject: [U2] Sequential Files Question Unidata 7.1.20 I've never dealt with sequential files, but I have a need to output records to a text file. Each record will be a series of fixed-length fields. Each file will need to be created at the time of opening. The destination will be a Windows folder on one of our servers. I will be using OPENSEQ to open the file. However, since each file needs to be created at time of opening what do I use to create the file? My reading of OPENSEQ doesn't indicate that it will create it automatically if it doesn't exist. Thanks. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ### The information transmitted in this message and attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. The intended recipient of this e-mail may only use, reproduce, disclose or distribute the information contained in this e-mail and any attached files with the permission of IMB. ### ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ### The information transmitted in this message and attachments (if any) is intended
Re: [U2] Sequential Files Question
Al; I use the following code: OPENSEQ 'OUTPUT.FILE', 'APCHECKS' TO OUTFILE THEN CRT 'APCHECKS ALREADY EXISTS' STOP END * code to build each line goes here MORE.DATA = 1 LOOP WHILE MORE.DATA DO LINE = 'data' 'L#9':MORE.DATA 'L#25':'still more data' 'L#20' WRITESEQ LINE APPEND ON OUTFILE ELSE CRT 'NOT AT END OF APCHECKS' MORE.DATA += 1 IF MORE.DATA >= 25 THEN MORE.DATA = 0 REPEAT CLOSESEQ OUTFILE Where OUTPUT.FILE is a VOC item (which means I can change the location of the file without recompiling/changing code): DIR C:\OUTPUT D_VOC Using the "THEN" construct means the program will stop if that item already exists so you won't overwrite any existing data. Technically, the file won't actually exist until you do the WRITESEQ, but it won't matter that it won't already exist, it will create it. You can't really deal with OUTFILE as a variable - it's really a (type of) file handle. The WRITESEQ will fly through the file - you don't have to worry about creating a large array - it will just keep writing until it hits the limit (not sure if it's the OS limit or UniData's 2GB limit). Hth Colin Alfke Calgary, Canada -Original Message- From: Al DeWitt I GET THE FOLLOWING MESSAGE [FATAL ERROR: - Cannot open file C:\OUTPUT\APCHECKS1002] and I'm sent to the colon prompt. Al DeWitt -Original Message- From: Dan McGrath If you run this code: OPENSEQ FNAME TO OUTFILE ON ERROR STOP 'FATAL ERROR: - Cannot open file ':FNAME END THEN STOP 'FATAL ERROR: - Already exiting file called: ':FNAME END ELSE CRT "FILE OPEN SUCCEEDED!" WRITESEQ "Dummy data" ON OUTFILE THEN NULL END What happens? -Original Message- From: Al DeWitt I forgot to mention that I'm on Windows. My output path is: C:\OUTPUT\ My file name isAPCHECKS where is a counter that gets incremented each time the program is run. FNAME would be C:\OUTPUT\APCHECKS so that my statement would read: OPENSEQ FNAME TO OUTFILE... However, since APCHECKS would be unique each time it doesn't exist. BTW when I try to display OUTFILE it gives me an Unitialized Variable, zero assumed error. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
Interesting that the code was sent through malformed like that, but that's a different issue... Just before the offending stop, add CRT STATUS() This will return the reason it is dropping into the ON ERROR section. Value - Description --- 0 - The record does not exist. 1 - The file you specify is not a sequential-access file. 2 - The file does not exist. 3 - The READONLY clause was included in the command statement and the record does not exist. 4 - An unknown error occurred (such as having too many files open or permission problems). -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 12:15 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question I GET THE FOLLOWING MESSAGE [FATAL ERROR: - Cannot open file C:\OUTPUT\APCHECKS1002] and I'm sent to the colon prompt. Al DeWitt -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath Sent: Wednesday, September 08, 2010 7:20 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question If you run this code: OPENSEQ FNAME TO OUTFILE ON ERROR STOP 'FATAL ERROR: - Cannot open file ':FNAME END THEN STOP 'FATAL ERROR: - Already exiting file called: ':FNAME END ELSE CRT "FILE OPEN SUCCEEDED!" WRITESEQ "Dummy data" ON OUTFILE THEN NULL END What happens? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 10:03 AM To: U2 Users List Subject: Re: [U2] Sequential Files Question I forgot to mention that I'm on Windows. My output path is: C:\OUTPUT\ My file name isAPCHECKS where is a counter that gets incremented each time the program is run. FNAME would be C:\OUTPUT\APCHECKS so that my statement would read: OPENSEQ FNAME TO OUTFILE... However, since APCHECKS would be unique each time it doesn't exist. BTW when I try to display OUTFILE it gives me an Unitialized Variable, zero assumed error. Al DeWitt -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath Sent: Wednesday, September 08, 2010 6:29 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question Yes, it will. Note: It will drop into the 'ELSE' clause if the file didn't exist to start with. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 8:55 AM To: u2-users@listserver.u2ug.org Subject: [U2] Sequential Files Question Unidata 7.1.20 I've never dealt with sequential files, but I have a need to output records to a text file. Each record will be a series of fixed-length fields. Each file will need to be created at the time of opening. The destination will be a Windows folder on one of our servers. I will be using OPENSEQ to open the file. However, since each file needs to be created at time of opening what do I use to create the file? My reading of OPENSEQ doesn't indicate that it will create it automatically if it doesn't exist. Thanks. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ### The information transmitted in this message and attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. The intended recipient of this e-mail may only use, reproduce, disclose or distribute the information contained in this e-mail and any attached files with the permission of IMB. ### ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u
Re: [U2] Sequential Files Question
I GET THE FOLLOWING MESSAGE [FATAL ERROR: - Cannot open file C:\OUTPUT\APCHECKS1002] and I'm sent to the colon prompt. Al DeWitt -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath Sent: Wednesday, September 08, 2010 7:20 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question If you run this code: OPENSEQ FNAME TO OUTFILE ON ERROR STOP 'FATAL ERROR: - Cannot open file ':FNAME END THEN STOP 'FATAL ERROR: - Already exiting file called: ':FNAME END ELSE CRT "FILE OPEN SUCCEEDED!" WRITESEQ "Dummy data" ON OUTFILE THEN NULL END What happens? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 10:03 AM To: U2 Users List Subject: Re: [U2] Sequential Files Question I forgot to mention that I'm on Windows. My output path is: C:\OUTPUT\ My file name isAPCHECKS where is a counter that gets incremented each time the program is run. FNAME would be C:\OUTPUT\APCHECKS so that my statement would read: OPENSEQ FNAME TO OUTFILE... However, since APCHECKS would be unique each time it doesn't exist. BTW when I try to display OUTFILE it gives me an Unitialized Variable, zero assumed error. Al DeWitt -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath Sent: Wednesday, September 08, 2010 6:29 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question Yes, it will. Note: It will drop into the 'ELSE' clause if the file didn't exist to start with. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 8:55 AM To: u2-users@listserver.u2ug.org Subject: [U2] Sequential Files Question Unidata 7.1.20 I've never dealt with sequential files, but I have a need to output records to a text file. Each record will be a series of fixed-length fields. Each file will need to be created at the time of opening. The destination will be a Windows folder on one of our servers. I will be using OPENSEQ to open the file. However, since each file needs to be created at time of opening what do I use to create the file? My reading of OPENSEQ doesn't indicate that it will create it automatically if it doesn't exist. Thanks. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ### The information transmitted in this message and attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. The intended recipient of this e-mail may only use, reproduce, disclose or distribute the information contained in this e-mail and any attached files with the permission of IMB. ### ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ### The information transmitted in this message and attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please con
Re: [U2] Sequential Files Question
If you run this code: OPENSEQ FNAME TO OUTFILE ON ERROR STOP 'FATAL ERROR: - Cannot open file ':FNAME END THEN STOP 'FATAL ERROR: - Already exiting file called: ':FNAME END ELSE CRT "FILE OPEN SUCCEEDED!" WRITESEQ "Dummy data" ON OUTFILE THEN NULL END What happens? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 10:03 AM To: U2 Users List Subject: Re: [U2] Sequential Files Question I forgot to mention that I'm on Windows. My output path is: C:\OUTPUT\ My file name isAPCHECKS where is a counter that gets incremented each time the program is run. FNAME would be C:\OUTPUT\APCHECKS so that my statement would read: OPENSEQ FNAME TO OUTFILE... However, since APCHECKS would be unique each time it doesn't exist. BTW when I try to display OUTFILE it gives me an Unitialized Variable, zero assumed error. Al DeWitt -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath Sent: Wednesday, September 08, 2010 6:29 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question Yes, it will. Note: It will drop into the 'ELSE' clause if the file didn't exist to start with. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 8:55 AM To: u2-users@listserver.u2ug.org Subject: [U2] Sequential Files Question Unidata 7.1.20 I've never dealt with sequential files, but I have a need to output records to a text file. Each record will be a series of fixed-length fields. Each file will need to be created at the time of opening. The destination will be a Windows folder on one of our servers. I will be using OPENSEQ to open the file. However, since each file needs to be created at time of opening what do I use to create the file? My reading of OPENSEQ doesn't indicate that it will create it automatically if it doesn't exist. Thanks. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ### The information transmitted in this message and attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. The intended recipient of this e-mail may only use, reproduce, disclose or distribute the information contained in this e-mail and any attached files with the permission of IMB. ### ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ### The information transmitted in this message and attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. The intended recipient of this e-mail may only use, reproduce, disclose or distribute the information contained in this e-mail and any attached files with the permission of IMB. ### _
Re: [U2] Sequential Files Question
I forgot to mention that I'm on Windows. My output path is: C:\OUTPUT\ My file name isAPCHECKS where is a counter that gets incremented each time the program is run. FNAME would be C:\OUTPUT\APCHECKS so that my statement would read: OPENSEQ FNAME TO OUTFILE... However, since APCHECKS would be unique each time it doesn't exist. BTW when I try to display OUTFILE it gives me an Unitialized Variable, zero assumed error. Al DeWitt -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath Sent: Wednesday, September 08, 2010 6:29 PM To: U2 Users List Subject: Re: [U2] Sequential Files Question Yes, it will. Note: It will drop into the 'ELSE' clause if the file didn't exist to start with. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 8:55 AM To: u2-users@listserver.u2ug.org Subject: [U2] Sequential Files Question Unidata 7.1.20 I've never dealt with sequential files, but I have a need to output records to a text file. Each record will be a series of fixed-length fields. Each file will need to be created at the time of opening. The destination will be a Windows folder on one of our servers. I will be using OPENSEQ to open the file. However, since each file needs to be created at time of opening what do I use to create the file? My reading of OPENSEQ doesn't indicate that it will create it automatically if it doesn't exist. Thanks. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ### The information transmitted in this message and attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. The intended recipient of this e-mail may only use, reproduce, disclose or distribute the information contained in this e-mail and any attached files with the permission of IMB. ### ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
Yes, it will. Note: It will drop into the 'ELSE' clause if the file didn't exist to start with. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, September 09, 2010 8:55 AM To: u2-users@listserver.u2ug.org Subject: [U2] Sequential Files Question Unidata 7.1.20 I've never dealt with sequential files, but I have a need to output records to a text file. Each record will be a series of fixed-length fields. Each file will need to be created at the time of opening. The destination will be a Windows folder on one of our servers. I will be using OPENSEQ to open the file. However, since each file needs to be created at time of opening what do I use to create the file? My reading of OPENSEQ doesn't indicate that it will create it automatically if it doesn't exist. Thanks. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ### The information transmitted in this message and attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. The intended recipient of this e-mail may only use, reproduce, disclose or distribute the information contained in this e-mail and any attached files with the permission of IMB. ### ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
you can also touch the file if your on unix or linex On Sep 8, 2010, at 7:10 PM, Wols Lists wrote: > On 08/09/10 23:55, Al DeWitt wrote: >> Unidata 7.1.20 >> >> I've never dealt with sequential files, but I have a need to output >> records to a text file. Each record will be a series of fixed-length >> fields. Each file will need to be created at the time of opening. The >> destination will be a Windows folder on one of our servers. I will be >> using OPENSEQ to open the file. However, since each file needs to be >> created at time of opening what do I use to create the file? My reading >> of OPENSEQ doesn't indicate that it will create it automatically if it >> doesn't exist. >> > Suck it and see ... I think it will create it for you. > > But if it doesn't - just write a "" to the FILE (as defined in the VOC) > and create it yourself as you need it. > > Cheers, > Wol > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users Theo Aivazian aivaz...@cinci.rr.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
On 08/09/10 23:55, Al DeWitt wrote: > Unidata 7.1.20 > > I've never dealt with sequential files, but I have a need to output > records to a text file. Each record will be a series of fixed-length > fields. Each file will need to be created at the time of opening. The > destination will be a Windows folder on one of our servers. I will be > using OPENSEQ to open the file. However, since each file needs to be > created at time of opening what do I use to create the file? My reading > of OPENSEQ doesn't indicate that it will create it automatically if it > doesn't exist. > Suck it and see ... I think it will create it for you. But if it doesn't - just write a "" to the FILE (as defined in the VOC) and create it yourself as you need it. Cheers, Wol ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sequential Files Question
Here's a wrapper I've used around seq file opens for years on unidata. F.FILE IS THE RETURNED FILE HANDLE-all others arguments are inputs. You need not force creation (at least not on *nix) http://jeff.hampshire.edu/seq.txt Jeff Butera Sent from my iPhone On Sep 8, 2010, at 6:55 PM, "Al DeWitt" wrote: > Unidata 7.1.20 > > I've never dealt with sequential files, but I have a need to output > records to a text file. Each record will be a series of fixed-length > fields. Each file will need to be created at the time of opening. The > destination will be a Windows folder on one of our servers. I will be > using OPENSEQ to open the file. However, since each file needs to be > created at time of opening what do I use to create the file? My reading > of OPENSEQ doesn't indicate that it will create it automatically if it > doesn't exist. > > Thanks. > > Al DeWitt > > > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Sequential Files Question
Unidata 7.1.20 I've never dealt with sequential files, but I have a need to output records to a text file. Each record will be a series of fixed-length fields. Each file will need to be created at the time of opening. The destination will be a Windows folder on one of our servers. I will be using OPENSEQ to open the file. However, since each file needs to be created at time of opening what do I use to create the file? My reading of OPENSEQ doesn't indicate that it will create it automatically if it doesn't exist. Thanks. Al DeWitt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users