Activity for Michael F Gleason

  • Michael F Gleason Michael F Gleason posted a comment on ticket #986

    oops. Forgot the milestone. resubmitted to prog guide. OK to DELETE this one.

  • Michael F Gleason Michael F Gleason created ticket #987

    Two change suggestions. SIZE parameter & grammar gripe

  • Michael F Gleason Michael F Gleason created ticket #986

    Two suggestions. One trivial grammar & info on SIZE parameter

  • Michael F Gleason Michael F Gleason created ticket #979

    Just some typos and a suggested addition for UNSTRING.

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    I'm not sure if you are looking for batch programs or interactive programs. If you are looking for batch programs that process Cobol source code, have a look at https://sourceforge.net/p/gnucobol/discussion/cobol/thread/a37c539dc5/?limit=25#82b5 When working on OLD code produced by someone else, I use these programs I wrote, and one that Arnold wrote. QWKFIX5.COB Which takes a program that multiple statements exist on one line and splits the lines up into multiple lines. IFALIGN.COB Written to align...

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    Ralph Long live macro assembler-F. Back in my IBM shop days, I would think in assembler and code in COBOL. When compiling COBOL, I always had the assembler code listed. That way I could tell if more efficient code could be produced. Things mostly like format conversions from display to packed and back could usually be eliminated from code. Thus saving machine strokes as well as memory. It was recommended that as few 01-levels, if possible, could be eliminated by grouping miscellaneous working storage...

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    Eugenio If you're interested, I have made some fixes and additions to the program and the test file. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    Simon I have -Wall in my compile bat now. I thought I did before, but I didn't. I got this before 0 warnings in compilation group 0 errors in compilation group when I compile. That is why I said I don't get a warning. My mistake. The move-ibm: yes in my default.conf file had to do with the warning not showing. Yup, that is it. I put move-ibm no back in my default.conf and now get the warnings. NAMES.COB:941: warning: overlapping MOVE may produce unpredictable results NAMES.COB:953: warning: overlapping...

  • Michael F Gleason Michael F Gleason modified a comment on discussion The Lounge

    Missing copy books attached here. The standard is clear on this one: it is undefined behaviour. AKA who knows. I should have guessed. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    Missing copy books attached here. The standard is clear on this one: it is undefined behaviour. AKA who knows. I should have guessed. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    I understand how an IBM move works. What I don't get is how MOVE in GnuCOBOL works. I was writing a little program that uses ascii graphic characters to draw boxes. I defined the characters in working storage like this. 019700 05 BOX-CHARACTERS. 019800 10 TOP-LEFT PIC X(01) VALUE X"DA". 019900 10 TOP-RIGHT PIC X(01) VALUE X"BF". 020000 10 BOT-LEFT PIC X(01) VALUE X"C0". 020100 10 BOT-RIGHT PIC X(01) VALUE X"D9". 020200 10 EDGE PIC X(01) VALUE X"B3". 020300 10 EDGE-LEFT PIC X(01) VALUE X"C3". 020400...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Your question was about communicating with pipe. As far as I know, pipe is used to present data to a program by using the ACCEPT and DISPLAY verbs. The facility provides for using a file to retrieve or send records to or from a line sequential file. For example, say you wish to pass a list of files to a program named PROG1. PROG1 would then open these files for whatever purpose it does. PROG1 would be executed from the command line PROG1 0< FILELIST.TXT A line sequential file named FILELIST.TXT would...

  • Michael F Gleason Michael F Gleason modified a comment on discussion Help getting started

    This issue has been resolved. Downloaded GNUCOBOL-X32-BDB from Chucks' post in GNUCOBOL forum. See topic New test build of GNUCOBOL 3.3dev... Michael :-)

  • Michael F Gleason Michael F Gleason modified a comment on discussion GnuCOBOL

    Simon It looks to me that ACCEPT, when identifier-1 is a numeric data item, uses the number of characters that are represented by the statement as the size of var-inp. For example, it uses 11 for the length of var-inp when you have '05 VAR-INP PIC S9(09)V99 defined. What it should be is 12, not 11. This then allows for the input to have a decimal '.' in it. Because the data item is defined as having two decimal places, ACCEPT should be working with 12 characters for var-inp. More compensation is...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    I sort of figured it out. The thingy did the trick. I was always wondering how people did that. Thanks for the lesson. Michael :-)

  • Michael F Gleason Michael F Gleason modified a comment on discussion GnuCOBOL

    Simon It looks to me that ACCEPT, when identifier-1 is a numeric data item, uses the number of characters that are represented by the statement as the size of var-inp. For example, it uses 11 for the length of var-inp when you have '05 VAR-INP PIC S9(09)V99 defined. What it should be is 12, not 11. This then allows for the input to have a decimal '.' in it. Because the data item is defined as having two decimal places, ACCEPT should be working with 12 characters for var-inp. More compensation is...

  • Michael F Gleason Michael F Gleason modified a comment on discussion GnuCOBOL

    Simon It looks to me that ACCEPT, when identifier-1 is a numeric data item, uses the number of characters that are represented by the statement as the size of var-inp. For example, it uses 11 for the length of var-inp when you have '05 VAR-INP PIC S9(09)V99 defined. What it should be is 12, not 11. This then allows for the input to have a decimal '.' in it. Because the data item is defined as having two decimal places, ACCEPT should be working with 12 characters for var-inp. More compensation is...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Here is the snippet I tried to post doing a copy paste

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Why does it always mess up the indentation when I paste something

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Simon It looks to me that ACCEPT, when identifier-1 is a numeric data item, uses the number of characters that are represented by the statement as the size of var-inp. For example, it uses 11 for the length of var-inp when you have '05 VAR-INP PIC S9(09)V99 defined. What it should be is 12, not 11. This then allows for the input to have a decimal '.' in it. Because the data item is defined as having two decimal places, ACCEPT should be working with 12 characters for var-inp. More compensation is...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Back to the topic the ACCEPT statement can return the wrong number. Instead of using ACCEPT into a numeric data item, with its problem. I am now using ACCEPT into a PIC X(100) data item then using the function TEST-NUMVAL-C to validate the entered data and if TEST-NUMVAL-C returns 0/zero I use the function NUMVAL to move/convert the picture X input to a PIC S9(09)V99 COMP-3 data item. I now can feel secure that I have a valid 9 position, 2 decimal place number to process. The input is now forced...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Vincent Well then, see attached minor things to update the manual. I was keeping track of typos and misstatements to submit some day. So some day is here. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Vincent Very interesting. Back in my days on the mainframe I designed and had my programmers write an inventory system that included multi warehouse inventory with automated item location receiving. The system included purchase ordering that was combined automated and manual. Sales order entry. interface into accounts receiving and paying and general ledger. It did order filling with backorder too. Basically, the system did everything but personnel keeping. The big PCs were 640k IBM xt. We did not...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Bryan The P.G. says If identifier-1 is a numeric data item, the character value read from the console or standard-input device will be parsed according to the rules for input to the NUMVAL intrinsic function (see [NUMVAL], page 502), except that none of the trailing sign formats are honoured. So, either the P.G. is in error or the ACCEPT statement should reject the input. Currently, the ACCEPT works as documented. '+' '-' '.' ',' and numbers 0-9 are accepted and parsed, as long as you do not enter...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Simon Sobisch Should I open a BUG on this? After checking with the P.G., I wrote a routine that accepts a number from the console. The spec calls for a 1-9 digit number plus 2 decimals, with or without comas and a decimal point, to be entered from the console. The entered number is then converted to a number in words. Under the condition that the user types more characters than 8 before typing a decimal point, the receiving field does not contain the number entered. For example, typing 123456789.12...

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    This issue has been resolved. Downloaded GNUCOBOL-X32-BDB from Chucks' post in GNUCOBOL forum. See topic <new test="" build="" of="" gnucobol="" 3.3dev...=""> Michael :-)</new>

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Chuck Via our Skype conversation, all is fixed now. For those following these posts. The issue was, before I was using pdcurses-wincon.dll for pdcurses.dll. This version is using pdcurses-wingui.dll. The fix for ALL my issues was to copy pdcurses-wincon.dll over pdcurses.dll Go to GNUCOBOL-X32-BDB\bin directory and do this copy copy pdcurses-wincon.dll pdcurses.dll Answer Y to the overwrite pdcurses.dll question. After doing the copy, all worked as before. No recompiles or anything required. Thank...

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Chuck If your gona test my code, here is some testing I did before submitting my original post. What I noticed is that moving a literal to an edit pattern will work at times that moving the same value from an identifier will fail. If you move an identifier-1 that defines more digits than the receiving identifier-2, it is not always handled correctly. See attach program and its' output. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    When you move a negative value to a numeric edit item and the - sign would/should be where a , is a space is moved in front of the number. See attached program sample. Moving a data item with a value -100 to an edit item pic --,---,--9 should result as -100 not - 100. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Do you have -lpdcurses on your compile? You are using an extended display and you need it. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    I have only one program that uses comp-x. I didn't write it, Brian Tiffin did. Why he used comp-x is beyond me. He did not do anything special with it. COMP-X-GROUP. (When pic 9) Pretty much the same as BINARY As far as I have been able to determine, this is a MicroFocus extention and should not be used outside of MF. Storage format is Compatible Binary Integer. Negative allowed if picture 9 and picture contains "S". Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    I have only one program that uses comp-x. I didn't write it, Brian Tiffin did. Why he used comp-x is beyond me. He did not do anything special with it. COMP-X-GROUP. (When pic 9) Pretty much the same as BINARY As far as I have been able to determine, this is a MicroFocus extention and should not be used outside of MF. Storage format is Compatible Binary Integer. Negative allowed if picture 9 and picture contains "S". Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Is this what you want? This program displays all the ascii characters. I wrote it a couple of years ago to see what is actually displayed vs what the docs say. Tell the program L for characters 0 to 127 or U for characters 128 to 255. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    Simon; NO-ECHO Works. When you enter data, spaces show no asterisk. This makes the PG in error when it says SECURE and NO-ECHO are the same. This syntax is valid in the following sections: SCREEN The NO-ECHO clause will cause all data entered into the field to appear on the screen as asterisks. 1. The NO-ECHO and SECURE (see [SECURE], page 215) clauses are interchangeable, and may not be used together in the same data item description. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    Thanks Eugenio. You know what I am after with this type of program. (games, menus, popups, and the like). I just added PROMPT CHARACTER IS " " to the input field in the screen section. Did this to not show the default underscore character. Now I get a nice clean empty space for where the user would key input. No blinking cursor, no prompt underscore, no data hanging around). I should have named the program GUESS256 or something like that. You just posted again, so, this post may be out of place....

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    No. The one you want is SECURE or NO-ECHO ( same thing) Tried that one already. These put * in place of the data typed. I did not want ANYTHING to show and also did not want the cursor blinking away. So I turn the cursor on and off at different points. And I move space into the screen section data field before displaying the screen. I have AUTO on the screen section data item. These two things are giving me what I want. As for "Read the manual" goes, I have the PG open in a window all the time. I...

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    I recall a sub search game like that. I was never good at it. I frustrated me. Up in SVN/trunk/samples/games is the star_trek game I fixed to run on GunCOBOL. Even though I got into the code, I cannot win without using the test functions that I added to it. In other words, I have to cheat to win. I also have a game of cards I wrote. You play 21/BlackJack against the computer. The house wins about 60% of the time. I enjoy writing the games more than playing them.

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    No. I check the reply for a character to end the program, or to see what the user choses as an option/answer, not just enter. Sometimes the reply needs to be just "enter", then other times I am looking for a single character of "H", "L" or "E" to respond to the guess, "Q" to quit the game, or anything else is invalid. The AUTO on the ACCEPT of the screen section data item is giving me what I want. This way, I don't care what the player responds with when "enter" is what I told the player to enter....

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    I tried AUTO on an ACCEPT like this ACCEPT THE-REPLY AT 005005 AUTO. THE-REPLY is a 1-character pic x defined in working storage. This worked. The data is received in THE-REPLY and pressing enter is not required. The following works too. I put it after the call to curs_set to turn off blinking cursor. The ACCEPT painted a square, blue box. Typed data shows as white in the box and no blinking. ACCEPT THE-REPLY AT 005005 with Background-color COB-COLOR-BLUE Foreground-color COB-COLOR-WHITE AUTO. This...

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    Vince Thanks. I tried AUTO on the accept statement. didn't work for me. The PG says This syntax is valid in the following sections: SCREEN. So I added AUTO to the screen section picture for the field. That worked. Now I need to change the comments saying press enter that the program displays. All my fun/thought I was smart code was for naught. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion The Lounge

    Back in 1969, I was working for Collins Radio Company. They were building their own mainframes. They only had their assembler for programming. One of the programmers wrote a game to guess the number from zero to 256. A pretty simple task. When I found GnuCOBOL in 2019, I was looking for something to do, so I scratched up a simple game to guess the number. Last week, I was without a project, so I took my program, GUESS.COB, and cleaned up the code and added a little to it. Originally, I used it to...

  • Michael F Gleason Michael F Gleason modified a comment on discussion Help getting started

    Opps. I hit post twice by accident. Michael :-)

  • Michael F Gleason Michael F Gleason modified a comment on discussion Help getting started

    HEXDUMP.COB has a COPY book HEX-TAB.CPY. Here it is attached. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    HEXDUMB.COB has a COPY book HEX-TAB.CPY. Here it is attached. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    HEXDUMB.COB has a COPY book HEX-TAB.CPY. Here it is attached. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    I could not get b.cbl to compile. It had errors, so I made some changes. See BB.COB attached. Also the call to hexDump had problem, so I included MY version called HEXDUMP to the bb.cob program. It now produces; 61313233343541 nb = +00007 0x00dd8090 9080DD00 Program runs on 32-bit architecture. Character set is ASCII. Byte order is little endian Dump of memory beginning at address: 0x00dd8090 Length of memory dump is: 7 Offset HEX-- -- -- -5 -- -- -- -- 10 -- -- -- -- 15 -- -- -- -- 20 -- -- -- --...

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Back in July 2021 I found GnuCOBOL. I have been writing code just to amuse myself. To make my coding simpler, I found and updated FileStat-Msgs copy book to be similar to one I used some 40 years ago. I created a mate to it called FileStat.cpy. When I loaded 3.2.0, I found missing status codes. So, I have created a pair of copy books I named GET-FILESTAT.CPY and GET-FILESTAT-WS.CPY and added the new/missing status codes to them. Attached are the copy books and a little program that show how they...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    I had problem with DAY-FROM-DATE back in Feb 2022. So I changed it to work. see attached, my version DAYFROMDATE.COB and a test program that uses it PEOG4.COB. Lately, I have been using the following because any date not just current date may be used. 005400 MOVE FUNCTION INTEGER-OF-DATE(CDT-DATE) TO CDTN-DATE. 005500 005600* Get the day of week for any date, not just current date. 005900 MOVE MOD(CDTN-DATE, 7) TO CDTE-DAY-NUM. 006000 IF CDTE-DAY-NUM = 0 006100 MOVE 7 TO CDTE-DAY-NUM. 006200 EVALUATE...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Thanks Arnold. I got your example to work. I was just interested in FORMATTED-CURRENT-DATE because the manual said it went to (8 decimal positions in the seconds). But as stated in the documentation, it will only go to milliseconds. On my machine, it just goes to 3 decimal places even as I specified 6 decimal places. I added a couple of variation of my own to yours. Attached. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Did you ever get FORMATTED-CURRENT-DATE to work? I have been trying to use MOVE with it but get an error FORMATTED-CURRENT-DATE has invalid date/time format. I'm running Gnu 3.2 Michael :-(

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Arnold I quadruple checked what and where I was doing the things. I even deleted and restarted from scratch 3 times. The error messages are coming from the build sh files. I Duh know. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    .

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Arnold I have been trying to run this build, but can not get step 7 or step 8 to run. I get the message that the required first input parm is missing. I have tried both to copy and paste, and to type the input. I get the same error either way. source build-x32.sh | tee build-x32.txt is what I entered. Other than the number of processors (cpu_count), I used all defaults. I used NotePad to edit the two files. This is my first attempt to use one of your builds. The install pdf is very clear in what...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    John If you are monitoring your posts, I have some copy book procedures that I use a lot. They are mostly dealing with getting things from the command line. There are basically routines to get override file names for hard coded files. Routines to get what I call switches to control program flow. Like perform a particular routine depending on a switch being on or off. Also routines that handle the STATUS of file processing. These routines are written so that switches and files may be in any order....

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Thanks Simon for the clarification on BYTES vs CHARACTERS. Anyone reading my posts, documentation notes need to understand what I meant VS what I typed. Sometimes my brain is someplace else. It (my brain) generally operated in 8-bit mode with a small memory size. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Thanks Ralph

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Some time ago, I found a program that had this type of code; MOVE WS-ITEM (1 : 15) TO WS-SEARCH-KEY (16 :) IF WS-ITEM (WS-POSITION : WS-LENGTH) EQUAL "ABC" . . . I understand what and how to use this definition, but can't find it in the manual. The move will move the 1st 15 bytes of WS-ITEM to WS-SEARCH-KEY and space fill. See, I understand, but I don't know what it is called. Not index or subscript. It drives me nuts that I can't find the documentation on this definition. I have been using this...

  • Michael F Gleason Michael F Gleason modified a comment on discussion Help getting started

    I think I recall reading that NEXT SENTENCE is or will be discontinued using CONTINUE in its place. I am old enough to use NEXT SENTENCE but have been using CONTINUE as of late. This is my question. In the code IF WS-TALLY EQUAL ZERO STRING WS-CUR-DIR DELIMITED BY " " "\" DELIMITED BY " " WS-FILE1 DELIMITED BY " " INTO WS-NEW-FILE1 ON OVERFLOW DISPLAY "STRING OVERFLOWED" DISPLAY " " MOVE SPACE TO WS-NEW-FILE1 CONTINUE END-STRING MOVE WS-NEW-FILE1 TO WS-FILE1 DISPLAY "New INPUT " TRIM(WS-FILE1) DISPLAY...

  • Michael F Gleason Michael F Gleason modified a comment on discussion Help getting started

    I think I recall reading that NEXT SENTENCE is or will be discontinued using CONTINUE in its place. I am old enough to use NEXT SENTENCE but have been using CONTINUE as of late. This is my question. In the code IF WS-TALLY EQUAL ZERO STRING WS-CUR-DIR DELIMITED BY " " "\" DELIMITED BY " " WS-FILE1 DELIMITED BY " " INTO WS-NEW-FILE1 ON OVERFLOW DISPLAY "STRING OVERFLOWED" DISPLAY " " MOVE SPACE TO WS-NEW-FILE1 CONTINUE END-STRING MOVE WS-NEW-FILE1 TO WS-FILE1 DISPLAY "New INPUT " TRIM(WS-FILE1) DISPLAY...

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Thanks Mickey. I missed the NOT ON OVERFLOW when reading about STRING. I have been trying to code a clean sentence but your example is good/correct way to do it. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Bryan. Thanks for the quick reply. I have done all your recommendations for reading before. You were so quick in replying that you did not see that I edited my post with a never mind. The answer to my question is to use the NEXT SENTENCE statement. I only wander if NEXT SENTENCE will become obsolete, as the manual seems to rant against it. Michael :-)

  • Michael F Gleason Michael F Gleason modified a comment on discussion Help getting started

    I think I recall reading that NEXT SENTENCE is or will be discontinued using CONTINUE in its place. I am old enough to use NEXT SENTENCE but have been using CONTINUE as of late. This is my question. In the code IF WS-TALLY EQUAL ZERO STRING WS-CUR-DIR DELIMITED BY " " "\" DELIMITED BY " " WS-FILE1 DELIMITED BY " " INTO WS-NEW-FILE1 ON OVERFLOW DISPLAY "STRING OVERFLOWED" DISPLAY " " MOVE SPACE TO WS-NEW-FILE1 CONTINUE END-STRING MOVE WS-NEW-FILE1 TO WS-FILE1 DISPLAY "New INPUT " TRIM(WS-FILE1) DISPLAY...

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    I think I recall reading that NEXT SENTENCE is or will be discontinued using CONTINUE in its place. I am old enough to use NEXT SENTENCE but have been using CONTINUE as of late. This is my question. In the code IF WS-TALLY EQUAL ZERO STRING WS-CUR-DIR DELIMITED BY " " "\" DELIMITED BY " " WS-FILE1 DELIMITED BY " " INTO WS-NEW-FILE1 ON OVERFLOW DISPLAY "STRING OVERFLOWED" DISPLAY " " MOVE SPACE TO WS-NEW-FILE1 CONTINUE END-STRING MOVE WS-NEW-FILE1 TO WS-FILE1 DISPLAY "New INPUT " TRIM(WS-FILE1) DISPLAY...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    To John and those interested in COBOLSEQ.COB new version 1.9. A fix was made to the convert to uppercase routine. When an * > also had quoted comments on the same line, the routine did not handle correctly. While I was at it, I added support for procedure names with 4 digit prefixes. This is now available when SWITCH-H-ON -h command line option is on. They are handled thusly. If a -SECTION line 005-SECTION precedes the paragraph, then; A procedure named 1234-MAIN will be sequenced in position 2-4...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    To John and those interested in COBOLSEQ.COB new version 1.9. A fix was made to the convert to uppercase routine. When an * > also had quoted comments on the same line, the routine did not handle correctly. While I was at it, I added support for procedure names with 4 digit prefixes. This is now available when SWITCH-H-ON -h command line option is on. They are handled thusly. If a -SECTION line 005-SECTION precedes the paragraph, then; A procedure named 1234-MAIN will be sequenced in position 2-4...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    To those interested in COBOLSEQ.COB new version 1.9. A fix was made to the convert to uppercase routine. When an * > also had quoted comments on the same line, the routine did not handle correctly. While I was at it, I added support for procedure names with 4 digit prefixes. This is now available when SWITCH-H-ON -h command line option is on. They are handled thusly. If a -SECTION line 005-SECTION precedes the paragraph, then; A procedure named 1234-MAIN will be sequenced in position 2-4 keeping...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    John Last year, a user asked for help formatting cobol programs. I and Arnold helped him with 3 programs that format cobol programs. Search for the discussion beautify. The discussion went on for 7pages. I wrote 3 programs and Arnold wrote one program. Arnold's program is called BEAUTIFY. When he got too busy to continue with the project, I took his program and did some modifications to it. I renamed the modified program TESTIT.COB. This program formats code to standards which are similar in many...

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Well, that explains it. I always thought the exit itself generated a restore of registers and a branch back. One is never too old to learn. Thanks Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    In the attached program, a GO TO to a paragraph containing only EXIT just continues. The EXIT is not executed. The paragraph is not referenced by a PERFORM THRU. Just GO TO 135-CCVS1-EXIT. The program continues with the code following the exit. Back in the 60's when I taught COBOL, you would perform a paragraph thru a paragraph containing only EXIT and the EXIT returned you back to the perform to continue from that point. This has been true for all of my experiences for more than 50 years. I do not...

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Vince I took a quick look at cobxref.cbl get-reserved-lists. I did a system call to pipe like you did of these and have programs that process each of them and make .cpy books. -list-reserved display reserved words -list-intrinsics display intrinsic functions -list-mnemonics display mnemonic names -list-system display system routines I was just looking to do the same thing but for ONLY verbs, not ALL RESERVED words. Sadly, a --list-verbs option isn't there. I wanted this because it would be dynamic...

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Vincent? Yes, I know some are not supported, :-( but that is OK for the task I am using the verbs for. That is why I initially wanted a -list-verbs cobc option. The cobc --list-reserved had a yes/no field that let me know if the word was supported. I was hoping for a --list-verbs that would also have that type of extra info. When I did the reserved word .cpy program, I did a system call in the program thusly; cobc --list-reserved 1> reserved-word.txt and then processed that file to get my data to...

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Simon. Thanks again for that. A bit much for my needs. Anyway, parser.y served my needs. I already wrote the program to create a table of verbs copy book and used the copy book in the program I needed it for. Not many people would ever need a copy book of COBOL verbs. I know of only two others who would need this info. I just needed the info for one of my COBOL preprocessor programs. Attached is how little it took to get the .cpy book. Just in case somebody would like to have it. Again Thx Michael...

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    Simon. Thanks. It took me a minute to search for parser.y in my MinGW directory. I did a copy and paste of the verbs, created a file, and wrote a program to create the copy book from that file. The copy book is a searchable table of the verbs. I never would've found this data myself. Ya saved me hours of looking in the manuals for this info. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion Help getting started

    I wanted a list of all the COBOL VERBS that cobc knows. I found the following, but I wanted a list of all the VERBS ONLY. Something like [-list-verbs] to display them. I have written little programs that read the output of things like cobc -list-reserved and make .cpy books from the information. See attached. I found a list of all (I suspect) the verbs that have END-xxx scope terminators, but it misses some obvious verbs like MOVE and GO. Any body know? -list-reserved display reserved words -list-intrinsics...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Arnold I don't know what a did wrong with the attachments. Here they are again.

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    IFALIGN Ver 2.5 I have been tooning up IFALIGN and fixing some problems. There are about 10 fixes/changes/additions to the code. See the Version 2.5 changes in the source code notes for what was done. This quick and dirty little program has turned out to be less quick than dirty. How does that song go? 99 bugs in the code, 99 bugs, fix 1 bug, recompile, 101 bugs in the code. Arnold. If you see this post. I attached my TESTIT.COB version of BEAUTIFY Version09 that I have been using. Also TESTIT-2.COB...

  • Michael F Gleason Michael F Gleason posted a comment on ticket #855

    Arnold I don't believe "beautify" should have dropped the END-CALL, so I'm curious how that happened BEAUTIFY did not drop the END-CALL. It was moved to a new line by IFALIGN so that it could be matched/indented/aligned to the CALL verb. IFALIGN splits off all END-verbs regardless of the associated verb. I had already run COBOLSEQ through IFALIGN and compiled and executes with no problem. Simon So, I believe the problem is C$DELETE is not able to determine that ZERO is 0. Yes no? Changing the ZERO...

  • Michael F Gleason Michael F Gleason created ticket #855

    codegen.c: 1217: internal compiler error

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Simon Sobisch Back on 09/01/2022 you made a suggestion that I look into the test programs where EXEC85 and the newcob.val source are. I replied with a rant about the programs. Well, I decided to give it a go and this is what was required to process the programs. The input IC101A.COB and output IC101A-2.COB files from one test are attached for comparison. The programs required to fix were 1. EXTRACTIT.COB A program I wrote last year to extract source from the newcob.val file. 2. QWKFIX5.COB A quick...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    IFALIGN Version 2.4 Fixed END-PERFORM not aligning sometimes. I duh-know why this never showed up before. Also, a couple of other minor changes. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    IFALIGN Version 2.3 Simon S. suggested I try IFALIGN on some of the code in contrib. So, I tried some and found some more shortcomings in IFALIGN. The corrections and additions in this version are; 1. Improvement to indentation of ELSE in IF statements. When there is more than one ELSE in an IF statement the indent is better now. There are still more conditions where it is not correct. 2. Fix to the verb to END-verb alignment routine where the matchup was not aligned correctly. 3. Added code to NOT...

  • Michael F Gleason Michael F Gleason modified a comment on discussion GnuCOBOL

    Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Jason Here is how I hide the cursor. 05 wInt binary-short signed. *> Used to Hide cursor *> hide the cursor *> move 0 to wInt to hide the cursor *> move 1 to wInt for fat underscore *> move 2 to wInt for blinking box <default> move 0 to wInt. call static "curs_set" using by value wInt end-call. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Jason Here is how I hide the cursor. 05 wInt binary-short signed. *> Used to Hide cursor *> hide the cursor *> move 0 to wInt to hide the cursor *> move 1 to wInt for fat underscore *> move 2 to wInt for blinking box <default> move 0 to wInt. call static "curs_set" using by value wInt end-call. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Simon A year or so ago I wrote a program to process the newcob.val file of test programs in the cobol85\newcob folder for GnuCobol 3.1.2. The program let me select a group of programs found in newcob.val and make individual source files. It also created two .BAT files. One to compile the group of programs, and one to run the programs and display the results of the tests. What I learned was, I would have fired that programmer. The code is ####ing crappy. Multiple statements on a line were a no no...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Jason Welcome back. You missed out on the excitement. Someone marked this thread as SPAM and all the posts went away :-O. Thankfully Bryan brought them back. :-) I have been wondering how your project is proceeding/going. What I never did was ask you to send me one of the larger program sources you are dealing with. I wanted to use one of yours for test input to IFALIGN, BEAUTIFY and COBOLSEQ to see how it comes out. I would NOT need any associated COPY books. If your programs are proprietary, I...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Arnold Regarding Your check for filename exists could be useful, but it is windows-specific and not portable to z/OS. I would consider including IFALIGN but its source code doesn't include Author, Date, or copyright notice. If it's not open source, it would be a copyright infringement for me to distribute it. And you might still want to enhance it further. IFALIGN uses the same CBL_CHECK_FILE_EXIST check for file exists that I added to the TESTIT copy of BEAUTIFY. It also uses CBL_COPY_FILE and CBL_TOUPPER...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    You are the man. T h a n k s A lot of people have followed this post. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    I understand NUM and NONUM. What I was thinking was a NUMOFF option that would leave 1-6 unchanged. Did you catch the "0." fix? As for the IF-ELSE_END-IF alignment and vertical alignment thing. I have been fussing with my IFALIGN program. Still has unsolved indentation problems. I got matching IF ELSE and END-IF down pretty good. It is now indenting other lines that is the problems. I am indenting lines after an END-IF wrong when the lines follow the last END-IF of a complex IF statement. If a program's...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Ralph It would be very interesting to me to see if the alignment can successfully process iterations of IF / END-IF where there is insufficient space left on a line to indent any further. IFALIGN indents IF statements as far as there is space on the line. If not enough room to indent, I indent as much as is possible. So the IF statement will not be indented enough. This happens after about the 4th or 5th IF without END-IF. The corresponding END-IF will indent to where they should. Other lines to...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Arnold Example of 0. 016500 SET ARGXSUB1 TO 0. This is the only one I have now. I have run most of what I am working on through CB2ALIGN or BEAUTIFY. I don't think you are trying to convert them in WORKING STORAGE. I think the patch I sent you fixes it. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Arnold My NUMOFF option is because I have things in 1-6 I want to keep until I am done making changes. I have been running code through my COBOLSEQ with the uppercase convert on and the don't change 1-6 on. But if I run it through BEAUTIFY I lose my data in 1-6. It is just the way I work. New code is in lower case. Questionable code has 000000 or 888888 or ?????? and other things in 1-6. I am probably the only one who would make this request anyway. Michael :-) ;-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    flaneur7508 Glad to hear that. I am still working on some of the bugs in IFALIGN. Mostly problems with indenting lines other than IF, END-IF, ELSE, AND and OR. Also adding a little more code to catch problems. The standard type of stuff. For example, the program expects the very last line of code to have a period. Otherwise, it gets dropped from the output. I fixed that. It is a mess trying to indent an inline PERFORM, END-PERFORM when it is part of an IF. And I just indent all other lines to the...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    No. Not broken. It just needs a space between the data name and the "(" open bracket. 500900 IF KEY-GROUP-SAVED-STAGING(GROUP-INDEX) NOT = SPACES add a space and the error should go away. 500900 IF KEY-GROUP-SAVED-STAGING (GROUP-INDEX) NOT = SPACES The error should a warning. The program doesn't care about any names except paragraph/procedure names. The output should be good. Try again after making change. let me know. Back in the day there was always a space there.

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    flaneur7508 Try this. When you run put switch -C on your command. If your procedure/paragraph name is not 3-digits and you want to seq them you need switch -F on. The program expects procedure names like 100-INIT-PROCS. example COBOLSEQ PROG1.COB -F -C -U This command would process PROG1.COB fixing un-numbered procedure names, not chatting with the user, and converting lowercase to uppercase. If you have more issues, send me your test program with what the issue is. What command line are you using?...

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Arnold I ran beautify against some test data with the NUMOFF option and it chopped off from col 67 to 80. BEAUTIFY IFDATAOUT.COB IFDATAOUT2.COB NUMOFF I ran IFALIGN against the test file IFDATAIN.COB creating IFDATAOUT.COB. Then ran BEAUTIFY with IFDATAOUT.COB in creating IFDATAOUT2.COB. See attached. Michael :-)

  • Michael F Gleason Michael F Gleason posted a comment on discussion GnuCOBOL

    Arnold. An other little thing. On lines that are all spaces except for the sequence number, You drop the line and replace it with a line not having the data in 1-6. Functionality, this does not affect the program but the data is gone. The purpose of NUMOFF was to preserve all the data in cols 1-6. Otherwise, it is looking good. It is doing what it is supposed to do. AKA as programed. To spec. Michael :-)

1 >