From: Pam & H. N. <phn...@ve...> - 2007-01-09 22:27:25
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Hi David.<br> <br> I took test26.cob as a start. The existing data being displayed is being updated with new data. I am using a PIC X(*) variable as TC doesn't deal well with non numeric data in a numeric variable.<br> <br> IDENTIFICATION DIVISION.<br> PROGRAM-ID. TEST26.<br> ENVIRONMENT DIVISION.<br> CONFIGURATION SECTION.<br> DATA DIVISION.<br> FILE SECTION.<br> <br> WORKING-STORAGE SECTION.<br> 01 D-1 PIC Z(6).99.<br> 01 D-2 PIC S9(6)V99 VALUE 45.77.<br> 01 W-1 PIC X(14) JUST RIGHT.<br> 01 W-2 PIC X(14) JUST RIGHT.<br> 01 W-3 PIC X.<br> 01 E-X PIC 9(4) COMP.<br> PROCEDURE DIVISION.<br> GO TO A001-START.<br> EX1-ERROR.<br> IF E-X = 14 MOVE 0 TO E-X.<br> A001-START.<br> MOVE D-2 TO D-1.<br> MOVE D-1 TO W-1.<br> display W-1 LINE 3 POSITION 10.<br> accept W-2 line 3 position 10 ON EXCEPTION E-X PERFORM EX1-ERROR.<br> INSPECT W-2 REPLACING LEADING " " BY "0".<br> <br> * IN HERE ARE LINES DETERMINING IF THE INPUT CHARACTERS ARE NUMERIC OR NOT.<br> <br> MOVE W-2 TO D-2.<br> MOVE D-2 TO D-1.<br> DISPLAY D-1 LINE 3 POSITION 10.<br> IF E-X = 0 GO TO A001-START.<br> <br> STOP RUN. <br> <br> What I get when I run the program is (on line 3 position 10).<br> 45.77<br> The accept cursor locates itself in column 10 AND does not blank out the 45.77<br> after I input numeric data and hit enter, the old 45.77 is replaced by the new data.<br> <br> If you don't get this when you run it, I'll send over a copy of my library. The only other addition to the library is a trap for control-c. My customer's employees enjoy, I think, entering control-c to terminate what ever they are doing and it has caused massive damage to the data files.<br> <br> I have go to go to Florida (Part vacation part because father-in-law is in the hospital) and I probably won't be back for a month or so.<br> <br> Harold<br> <br> <blockquote cite="mid...@li..." type="cite"> <table class="header-part1" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr> <td> <div class="headerdisplayname" style="display: inline;">Subject: </div> Re: [Tiny-cobol-users] Changes to curses accept</td> </tr> <tr> <td> <div class="headerdisplayname" style="display: inline;">From: </div> David Essex <a class="moz-txt-link-rfc2396E" href="mailto:de...@us..."><de...@us...></a></td> </tr> <tr> <td> <div class="headerdisplayname" style="display: inline;">Date: </div> Tue, 09 Jan 2007 02:55:53 -0500</td> </tr> <tr> <td> <div class="headerdisplayname" style="display: inline;">To: </div> tiny-cobol-users <a class="moz-txt-link-rfc2396E" href="mailto:tin...@li..."><tin...@li...></a></td> </tr> </tbody> </table> <table class="header-part2" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr> <td> <div class="headerdisplayname" style="display: inline;">To: </div> tiny-cobol-users <a class="moz-txt-link-rfc2396E" href="mailto:tin...@li..."><tin...@li...></a></td> </tr> </tbody> </table> <br> Harold Norris wrote: <br> <br> > ... <br> > This is an update to my request for an update to <br> > curses accept which allow preexisting data to be <br> > displayed as opposed to being over written by an <br> > empty variable. <br> > <br> > I am not, nor do I plan to become a C programmer. <br> > I did, however find an easy way to achieve my goals <br> > without apparently causing any other problems to occur. <br> <br> After some small tests, I suspect your modifications do not fully meet your objective. <br> <br> Just to clarify your objective. Do you have some small sample COBOL code you could you post to this list, which demonstrates what you are trying to achieve. <br> <br> David Essex <br> <br> <br> <br> <br> <br> <hr size="4" width="90%"><br> <table class="header-part1" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr> <td> <div class="headerdisplayname" style="display: inline;">Subject: </div> [Tiny-cobol-users] Documentation: man and help files updates - translators needed</td> </tr> <tr> <td> <div class="headerdisplayname" style="display: inline;">From: </div> David Essex <a class="moz-txt-link-rfc2396E" href="mailto:de...@us..."><de...@us...></a></td> </tr> <tr> <td> <div class="headerdisplayname" style="display: inline;">Date: </div> Tue, 09 Jan 2007 02:56:12 -0500</td> </tr> <tr> <td> <div class="headerdisplayname" style="display: inline;">To: </div> tiny-cobol-users <a class="moz-txt-link-rfc2396E" href="mailto:tin...@li..."><tin...@li...></a></td> </tr> </tbody> </table> <table class="header-part2" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr> <td> <div class="headerdisplayname" style="display: inline;">To: </div> tiny-cobol-users <a class="moz-txt-link-rfc2396E" href="mailto:tin...@li..."><tin...@li...></a></td> </tr> </tbody> </table> <br> Hi all, <br> <br> I'm in the process of updating some TC documentation to be used for <br> command line help, man files and Html docs. <br> <br> Currently there are partial or out of date translations for Spanish <br> (es), French (fr), Italian (it) and Portuguese (Brazilian BR). <br> <br> Your help is needed to translate or update these translations. <br> <br> I have enclosed some text files which can be used as a starting point. <br> Or if any one would like to add another language please use English as <br> your guide. <br> <br> All that is required is the translated text, and I will do the rest. <br> <br> So please forward any translated text files to this mailing list, or <br> preferably to my email address. <br> <br> Please note that have removed the configure option for language, besides <br> English, from the TC compiler. So the only language that is currently <br> available for command line help is English. <br> <br> I will be glad to add any language, as long as I receive an new or <br> updated translated text. <br> <br> Thanks for help, <br> <br> David Essex <br> <br> <pre wrap=""> <hr size="4" width="90%"> ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash <a class="moz-txt-link-freetext" href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV">http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</a></pre> <pre wrap=""> <hr size="4" width="90%"> _______________________________________________ Tiny-cobol-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Tin...@li...">Tin...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users">https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users</a> </pre> </blockquote> <br> </body> </html> |
From: David E. <de...@us...> - 2007-01-11 00:16:48
|
Harold Norris wrote: > I took test26.cob as a start. > The existing data being displayed is being updated > with new data. > I am using a PIC X(*) variable as TC doesn't deal > well with non numeric data in a numeric variable. > ... > WORKING-STORAGE SECTION. > 01 D-1 PIC Z(6).99. > 01 D-2 PIC S9(6)V99 VALUE 45.77. > 01 W-1 PIC X(14) JUST RIGHT. > 01 W-2 PIC X(14) JUST RIGHT. > 01 W-3 PIC X. > 01 E-X PIC 9(4) COMP. > PROCEDURE DIVISION. > GO TO A001-START. > EX1-ERROR. > IF E-X = 14 MOVE 0 TO E-X. > A001-START. > MOVE D-2 TO D-1. > MOVE D-1 TO W-1. > display W-1 LINE 3 POSITION 10. > accept W-2 line 3 position 10 > ON EXCEPTION E-X PERFORM EX1-ERROR. > INSPECT W-2 REPLACING LEADING " " BY "0". > * IN HERE ARE LINES DETERMINING IF THE > * INPUT CHARACTERS ARE NUMERIC OR NOT. > MOVE W-2 TO D-2. > MOVE D-2 TO D-1. > DISPLAY D-1 LINE 3 POSITION 10. > IF E-X = 0 GO TO A001-START. > STOP RUN. > > What I get when I run the program is > (on line 3 position 10). > 45.77 > The accept cursor locates itself in > column 10 AND does not blank out the 45.77 > after I input numeric data and hit enter, > the old 45.77 is replaced by the new data. I think your code segment works, but there is no automated way to test you code changes for any new bugs. I have looked at the code, and currently there are two options available. The first, the default, will pad the data with blanks and display it. The second, UPDATE, will update the display field with the contents of the identifier. So I'm not aware of any SCREEN-IO option to achieve the desired effect. But I think that would be the way to do it. Is any one aware if it is possible to to the above with other compilers? And if so, is it an option or default behavior. > If you don't get this when you run it, I'll send over a copy of my > library. The only other addition to the library is a trap for > control-c. > My customer's employees enjoy, I think, entering control-c > to terminate what ever they are doing and it has caused > massive damage to the data files. Congratulations, you are now officially a C programmer. Well 'control-c' is trapped by the curses library, I think. It is supposed to be used in emergency situations only. The TC RTL does not do any clean-up of the run-time unit. As a result, the files are not sync-ed and closed. There are some ways around this, but then you would need some other way to trap an emergency exit. David Essex |
From: John R. C. <jo...@we...> - 2007-01-10 00:07:59
|
On Tuesday 09 January 2007 18:34, Pam & Harold Norris wrote: > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> On mailing lists it is considered courtesy not to send html formatted messages. Most savvy people have html turned off in their mail readers to avoid possible expolits by spammers. -- John Culleton Able Indexing and Typesetting Precision typesetting (tm) at reasonable cost. Satisfaction guaranteed. http://wexfordpress.com |
From: David E. <de...@us...> - 2007-01-11 18:18:42
|
David Essex wrote: > Harold Norris wrote: >> ... >> If you don't get this when you run it, I'll send over a copy of my >> library. The only other addition to the library is a trap for >> control-c. >> My customer's employees enjoy, I think, entering control-c >> to terminate what ever they are doing and it has caused >> massive damage to the data files. > ... > Well 'control-c' is trapped by the curses library, I think. > It is supposed to be used in emergency situations only. > > The TC RTL does not do any clean-up of the run-time unit. > As a result, the files are not sync-ed and closed. I will add a control-c trap to the RTL defined at run-time, with the following options. 1) Ignore This option will trap but ignore the signal 2) Exit This option will trap and perform an clean exit of the program using the RT exit routines. Hint: The 'CRT STATUS' can be used to determine a key press. Function keys F1-Fn (PF1-PFn), can be used to perform special functions. Key: F1 value: 0264 + 1 Key: Fn value: 0264 + n Example: IDENTIFICATION DIVISION. ... CONFIGURATION SECTION. SPECIAL-NAMES. CRT STATUS IS status-field. ... WORKING-STORAGE SECTION. 01 status-field PIC 9(04) VALUE 0. 88 status-field-f3 VALUE 0267. ... PROCEDURE DIVISION. ... perform A-200 until status-field-f3 . ... A-200. ... accept ... line 2 position 1. ... Hope this helps. David Essex |