I've written some pretty big records/files with writeseq that I don't think 
you're coming anywhere close to.

I use the else to notify me in case the system (writeseq append) isn't at the 
end of the file where I think it should be. 

Help says that: ELSE executes if the WRITESEQ is not successful
or if the record or ID does not exist.

If the ID was invalid I would expect a different status value.

Is it possible you have a char(10) in the msg_hex variable? That might do it as 
well.

hth

Colin Alfke
Calgary

>-----Original Message-----
>From: Dana Baron 
>
>Here's a puzzler: what is it that causes the ELSE clause to be 
>executed in a
>WRITESEQ block when the only apparent change is the content of 
>the data to
>be written. I've included a section of code below followed by 
>the output
>from two subsequent calls. In the first, the code executes the 
>THEN clause
>and prints SENDING... In the second, the ELSE clause is 
>executed producing
>the ERROR WRITING... results. Any thoughts? Could it be that there is a
>limit to the size of the data that wan be written using WRITESEQ?
>
>This code segment:
>
>******************
>SAVE_MESSAGE_FILE:
>
>        UNIX_DIR = "/unidata/lodginglink/"
>        SAVE_DIR = "/unidata/lodginglink/save/"
>        DATE_PART = DATE()
>        TIME_PART = TIME()
>        MSG_PART = UHLL.ITEM<UHLL.TXN.ID.AMC> : 
>UHLL.ITEM<UHLL.SEQ.NUM.AMC>
>        FILE_NAME = DATE_PART:TIME_PART:MSG_PART:".out"
>
>        OPENSEQ UNIX_DIR, FILE_NAME TO FILE_POINTER THEN
>                OK_TO_CONTINUE = TRUE.
>        END
>        PRINT "OPENSEQ STATUS IS " :
>        PRINT STATUS()
>
>        MSG_HEX = OCONV(MSG_OUT,"MX")
>        WRITESEQ MSG_HEX ON FILE_POINTER THEN
>                IF TRACE.ON THEN
>                        PRINT "SENDING: " : MSG_OUT
>                END
>        END ELSE
>                PRINT "ERROR WRITING"
>                PRINT "ASCII MESSAGE IS " : MSG_OUT
>                PRINT "HEX MESSAGE IS " : MSG_HEX
>                PRINT "FILE NAME IS " : FILE_NAME
>        END
>        CLOSESEQ FILE_POINTER
>
>SAVE_MESSAGE_FILE_EXIT:
>RETURN
>*******
>
>Produces this output:
>
>OPENSEQ STATUS IS 0
>SENDING: ^B451900000389999^C1
>OPENSEQ STATUS IS 0
>ERROR WRITING
>ASCII MESSAGE IS ^B254440000369999008019DISHONGH, GEORGIA
>L1060091*1163482144001015100101740043801175003SY11770010^C0
>HEX MESSAGE IS
>02323534343430303030333639393939303038303139444953484F4E47482C2
>047454F524749
>41204C313036303039312A31313633343832313434303031303135313030313
>0313734303034
>33383031313735303033535931313737303031300330
>FILE NAME IS 135014589700369999.out
>
>
>Dana Baron
>System Manager
>Smugglers' Notch Resort
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to