Don’t ever program an error clause that prints “ERROR” and then carries on
anyway. You need to abort the program sensibly.



You can also do:



EXECUTE 'SH -c "rm –f ETC.BP/CBSL1.TXT; touch ETC.BP/CBSL1.TXT "'



But are you sure that you want to create a data file in a .BP directory – I
don’t believe you wanted to do that!



Jim



*From:* [email protected] [mailto:[email protected]] *On Behalf Of
*Santosh
*Sent:* Tuesday, April 26, 2011 11:03 AM
*To:* [email protected]
*Subject:* Re: T24 : WRITESEQ Fails



2 Solutions: (You can follow either one )



1. Create CBSL1.TXT under ETC.BP manually from your jbase prompt and execute
the program it will write properly

2. In your program Change the OPENSEQ with the following:


OPENSEQ 'ETC.BP/CBSL1.TXT' TO TEXT.FILE ELSE CREATE TEXT.FILE ELSE PRINT
"ERROR"



I suggest to go with 2nd option. So that manually you need not do anything.



Now you can check after fixing this.

On Tue, Apr 26, 2011 at 7:20 AM, hareendra seneviratne <[email protected]>
wrote:

Hi,



I have following set of coding


GOSUB INIT
GOSUB PROCESS


INIT:
*****
...

EXECUTE 'SH -c "rm ETC.BP/CBSL1.TXT"'
OPENSEQ 'ETC.BP/CBSL1.TXT' TO TEXT.FILE ELSE PRINT "ERROR"

...


PROCESS:
********

...

  WHILE DRID:MORE
      CALL F.READ(FN.DRAWINGS,DRID,R.DR,F.DRAWINGS,ERR)
      Y.TMP.LINE = LINE
      *Y.TMP.LINE* := R.DR<TF.DR.DRAW.CURRENCY>
:"|":R.DR<TF.DR.DOCUMENT.AMOUNT>
      WRITESEQ Y.TMP.LINE TO TEXT.FILE ELSE PRINT "ERROR"

  REPEAT

...



On the DEBUG data comes to  *Y.TMP.LINE *and the line is created as
required.

But it does not generate the text file in *ETC.BP/CBSL1.TXT *as expected.

What might've gone wrong?



Thanks for ur replies.



-- 
Please read the posting guidelines at:
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific
to Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at
http://groups.google.com/group/jBASE?hl=en




-- 
Mobile: 973-39406098

"Nobody can go back and start a new beginning, but anyone can start today
and make a new ending"

-- 
Please read the posting guidelines at:
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific
to Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at
http://groups.google.com/group/jBASE?hl=en

-- 
Please read the posting guidelines at: 
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to 
Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Reply via email to