cobxref (v1.01.07): Error: Eof on source possible logic error at aa047 ASSUMING again

2014-07-11
2014-11-14
  • Simon Sobisch

    Simon Sobisch - 2014-07-11

    Post from Klaus Schäfer (deleted because attached COBOL [production] source may not be posted in public without permission of the Copyright owner, and because the original topic was only about 32/64bit issues):

    I tried the new version of cobxref but it doesnt work for me. It brings always Msg16 - I use at the moment Open-cobol 2.0 and in the attachment there is the source, wich makes problems and the output of cobc --version and the output of cobxref. I produced the error with following commands.
    cobc -E -o /tmp/test.cob vbestpan.cob for precompiling the source and
    cobcrun cobxref /tmp/test.cob - and this produces then the error and no listing

    Intrinsic word table was successfully updated
    Reserve word table was successfully updated
    Error: Eof on source possible logic error at aa047 ASSUMING again
    
     

    Related

    Discussion: 866b7594


    Last edit: Simon Sobisch 2014-07-11
    • Vincent (Bryan) Coen

      Your usage of cobxref looks incorrect.

      At the request of Roger the program was changed to only take source using two methods:

      1. via cobc -X srcfilename

      2. After running cobc -E srcfilename and running cobxref srcfilename.i

      As the copy book replace code was no longer needed it was removed and is in my printcbl program for users wishing to have a source listing with copy books included. That program can instead of creating print file, create a new source file containing the copy books.

      I will admit since that requested change I am seeing some odd errors the most noticeable being the msg16 aa047 error.

      The only other way it appears is if the source file is in the wrong format (see above).

      As all of my code is now in free format can you retest against a fixed format program and see if the error still comes up?

      Vince

       
  • Simon Sobisch

    Simon Sobisch - 2014-07-11

    Hi Klaus,

    I've seen this error before, it even happens when cobxref.cbl is passed to cobxref binary. As Vincent likely won't fix this soon you're invited to investigate this issue and provide a fix for cobxref.cbl - I'll upload it to svn.

    Simon

     
  • Vincent (Bryan) Coen

    Noticed that someone fixed the high-values issue with a numeric field and
    replaced a pic 99 with pic xx Not a good idea just change the 'high-values' with 99. However the highest value in a numeric field is ... 99 and thats what the compiler should be using.

    I have started trying to trace the problem with the aa047 error but other are invited to help :)

     
    Last edit: Vincent (Bryan) Coen 2014-07-13
    • Simon Sobisch

      Simon Sobisch - 2014-07-14

      The someone was me. And no, a compiler should not use the highest numeric value when a move to a numeric value is done. Quoting 20xx FCD (was the same in the standards before, if not please post the according passages):

      8.3.1.2.5 Figurative constant values
      At compile time and when referenced in the SPECIAL-NAMES paragraph, the high-value format represents the character, or multiple-character combination, that has the highest ordinal position in the collating sequence used during compilation.
      At runtime, when referenced outside the SPECIAL-NAMES paragraph, the high-value format represents the character, or multiple-character combination, that has the highest ordinal position in the runtime collating
      sequence.

      14.9.24 MOVE statement
      The category of figurative constants when used in the MOVE statement depends on the category of the receiving operand as shown in table 18, Category of figurative constants used in the MOVE statement.
      Figurative constant: HIGH-VALUE, HIGH-VALUES; LOW-VALUE, LOW-VALUES
      Category of receiving operand Numeric
      Category of figurative constant: Alphanumeric

      If you compile with the correct switches there may be no Error/Warning but the runtime behaviour is undefined.

      Simon

       
      • Vincent (Bryan) Coen

        Like I said 'highest ordinal pos in collating sequence' for a numeric
        value is 9 or a sequence there of.

        Vince

        On 14/07/14 19:31, Simon Sobisch wrote:

        At runtime, when referenced outside the SPECIAL-NAMES paragraph, the
        high-value format represents the character, or multiple-character
        combination, that has the highest ordinal position in the runtime
        collating
        sequence.

         
  • Klaus Schäfer

    Klaus Schäfer - 2014-07-14

    The source in the attachement was original a private written program for me for testing purposes and not a work for my company. There are no copyright-problems with this sourcecode.
    Greetings from Germany
    Klaus

     
    • Simon Sobisch

      Simon Sobisch - 2014-07-14

      OK, didn't look like that but more like a production code. Please add a hint in the program header via easy understandable and English comments if you post samples like that and don't use any proper names in it.

      Thank you,
      Simon

       
  • Klaus Schäfer

    Klaus Schäfer - 2014-07-15

    i think, the Cross-Reference should be produced by the compiler itself. In the old years of IBM-Mainfraimes still the cobol 68-Compiler from MVT did this job. The searching for strings and so on is everytime a risk and the compiler itself knows best about defined fields and their usage because he can produce warnings from unused variables so he knows about them.

     
    • Brian

      Brian - 2014-07-16

      I totally agree with Klaus here.
      Same goes for list files WITH comments ;)

       
  • Vincent (Bryan) Coen

    The current version of cobxref held here has one or more bugs that cause msg16 to appear with no xref output but does produce a program listing ex cobc which looks a mess.

    I will revisit it after I finish the IBM MVS version to which I am adding cobdata that produces a sizing reports for all 01 level records both in File Section and WS. This is currently being tested as an independent module/program prior to merging with cobxref.

    After that I will find the issues in the GC version and see if I can go back to using the users original source program and process the COPY verbs myself using code from my printcbl program.

     
    • Simon Sobisch

      Simon Sobisch - 2014-08-07

      Sounds good. Please add Local Storage (maybe Screen Section), too when merging with cobxref.

      Simon

       
      • Vincent (Bryan) Coen

        Those have been supported since day one.

        Vince

        On 07/08/14 14:23, Simon Sobisch wrote:

        Sounds good. Please add Local Storage (maybe Screen Section), too when
        merging with cobxref.

        Simon


         
        • Simon Sobisch

          Simon Sobisch - 2014-08-07

          Sorry for not being clear: adding LS and SS to sizing reports (not in the MVS version, according to your previous post)

          Simon

           
          • Vincent (Bryan) Coen

            Sizing for ALL 01 records is the plan.

            Vince

            On 07/08/14 15:12, Simon Sobisch wrote:

            Sorry for not being clear: adding LS and SS to sizing reports (not in
            the MVS version, according to your previous post)

            Simon


             
            • Brian

              Brian - 2014-08-14

              just curious if there's already a new version available for testing purposes :)

               
              • Vincent (Bryan) Coen

                No, not yet.

                Currently working on the IBM ANSI Cobol version with COBDATA integration
                for providing group level sizing info.

                When that is complete I will start work on the GC version using a
                slightly later version but which still has the msg16 problem.

                I have to decide whether to revert the way it works by only taking the
                original source file and not the one produced by GC that has removed the
                comments and moved the source text to the left making it impossible to
                read the source listing element.

                Considering adding in the code from PRINTCBL that gets any COPY
                libraries and then produces a listing.

                It will get around some current problems including as mentioned above..

                Options please ...

                Vince

                 
                Last edit: Simon Sobisch 2014-08-16
                • Brian

                  Brian - 2014-08-14

                  IMHO merging printcbl and cobxref would be a good idea.
                  not sure what others might think about.

                  ah yeah thanks for the fast response :)

                  best wishes,
                  Brian

                   
                • Simon Sobisch

                  Simon Sobisch - 2014-08-16

                  I take the options as opinions. Here's mine:
                  Considering the current listing options it would be good to have an external listing option.
                  I'm not sure if printcbl can be used as it is, if yes I'd like to add a call to it from cobc.
                  cobxref is by design no listing tool (correct me if I'm wrong) and should better be fed with a real listing (where printcbl could kick in).

                  In the medium term I'd like to have cobc produce a clean listing, if the current option is used and opened a ticket (#32) for discussion and volunteering. Please post your comments, direct link.

                  Simon

                   
                  • Vincent (Bryan) Coen

                    Cobxref and assuming it is working, produces a source listing followed
                    by the Xref.by default.

                    On top of that you can choose to have the o/p in upper or lower case.

                    Well that the way it was before integration with cobc that passes a
                    reduced source file that has the text shifted to the left.

                    Which make it a pain in the butt to read (sticking to the American
                    vocabulary as it were).

                    Personally I find it very hard on my eyes but what the heck, I am
                    getting old...

                    Vince

                    On 16/08/14 20:35, Simon Sobisch wrote:

                    I take the options as opinions. Here's mine:
                    Considering the current listing options it would be good to have an
                    external listing option.
                    I'm not sure if printcbl can be used as it is, if yes I'd like to add
                    a call to it from cobc.
                    cobxref is by design no listing tool (correct me if I'm wrong) and
                    should better be fed with a real listing (where printcbl could kick in).

                    In the medium term I'd like to have cobc produce a clean listing, if
                    the current option is used and opened a ticket (#32) for discussion
                    and volunteering. Please post your comments, direct link
                    https://sourceforge.net/p/open-cobol/feature-requests/32.

                    Simon


                    cobxref (v1.01.07): Error: Eof on source possible logic error at aa047
                    ASSUMING again
                    https://sourceforge.net/p/open-cobol/discussion/contrib/thread/23325b88/?limit=25#c6a9/15a2/85cd/d182/5830/f07c/84de/0ee7


                     
                  • Brian

                    Brian - 2014-08-19

                    not sure everyone finds the direct link or checks for feature requests.
                    any chances of pinning it to top?

                     
                    • Vincent (Bryan) Coen

                      I have absolutely no idea how, assuming you can.

                      Currently still testing the cobdata function for IBM mode but have hit a
                      problem replacing the SET .. TO TRUE to a
                      MOVE 'x' to variable... more testing ..

                      Vince

                      On 19/08/14 08:03, Brian wrote:

                      not sure everyone finds the direct link or checks for feature requests.
                      any chances of pinning it to top?


                       
                      • Brian

                        Brian - 2014-10-20

                        Vince, did you make any progress?
                        Would finally love to see a good listing :)

                         
                        • Vincent (Bryan) Coen

                          No not yet have other stuff to sort out but if you are after a tool to
                          give good listing why not use printcbl that loads in all copybooks prior
                          to printing

                          Current version is v2.01.13 available at the contrib pages or via my
                          website at:

                          http://www.applewoodbbs.dtdns.net/files/printcbl-latest.zip

                          Vince

                          On 20/10/14 17:36, Brian wrote:

                          Vince, did you make any progress?
                          Would finally love to see a good listing :)


                           
                          • Brian

                            Brian - 2014-10-24

                            thanks, it looks pretty good but just tried it and it produces:

                            printcbl.cbl: 1879: libcob: 
                            OCCURS DEPENDING ON 'Fht-Table-Size' out of bounds: 11
                            

                            Any chances of combining printcbl and cobxref?

                             
                            • Vincent (Bryan) Coen

                              I have had to use it twice this week/last with no issues so, what
                              compiler are you using to create the binary?

                              I am using v2.1 but 2.0 should not be an problem as well.

                              Can you send me a copy of the source program you used that created the
                              error along with the copybooks if any that are used..
                              You can send it to me as a zipped/rar file using vbcoen at btconnect .com

                              Regarding printcbl to cobxref...

                              Yes that is under serious consideration.
                              Originally the copybook procedures was in cobxref but when we switched
                              to using v2 in 2009 the code was removed more to do with the way Roger
                              wanted it to work eg source preprocessed and converted to free and then
                              passed to cobxref.

                              This led to the code that was involved in processing the copybooks and
                              checking for problems so related being removed but the output listing
                              (source) from cobxref became a bit of a dogs dinner to look at as that
                              is what cobc does for its source listing with the comment lines blanked
                              out and all the sources moved to the left with only one space between
                              works which is great for the compiler but ...

                              I really should get on to this and I will but as I now have cataracts in
                              right eye to the point of being unable to see at all clearly and the
                              left eye also having patches of them, it is going to be a few months
                              (consultation on 27th Nov) before I can have the surgery.

                              At that point I will get back to the problem and reinstall the code
                              which will be mostly printcbl code -> cobxref and clean up the source
                              code checking, so hopefully then the silly 047 error will stop.

                              In a nutshell give me till mid January and remind me.
                              Hopefully my eyes will be better by then having had the surgery.

                              Vincent

                              On 24/10/14 10:20, Brian wrote:

                              thanks, it looks pretty good but just tried it and it produces:

                              printcbl.cbl: 1879: libcob:
                              OCCURS DEPENDING ON 'Fht-Table-Size' out of bounds: 11

                              Any chances of combining printcbl and cobxref?


                               
                              • Brian

                                Brian - 2014-10-27

                                sorry for the late response.
                                first of all thanks for sharing the information.

                                I've been able to reproduce the same error by using printcbl with the printcbl.cbl source itself. I just used fixed instead of free for compiling it.

                                ./printcbl printcbl.cbl printcbl.lst fixed abc <-- did not work and ended up with OCCURS DEPENDING ON 'Fht-Table-Size' out of bounds: 11
                                
                                ./printcbl printcbl.cbl printcbl.lst free abc <-- worked
                                

                                the original source files (university property again) aren't in free format so I'm not sure what causes the same error.

                                wish you all the best to regain your healthness

                                edit:
                                as a sidenote I also have problems with cobxref getting

                                Attempt to reference unallocated memory (Signal SIGSEGV)
                                

                                when I try to input some source files (with all the copies they're darn long)

                                 
                                Last edit: Brian 2014-10-27
                                • Simon Sobisch

                                  Simon Sobisch - 2014-10-27

                                  For your sidenote: translate everything from cobxref with -debug to enable runtime checks and try again - you should see the COBOL source line where the error occurs.

                                  Simon

                                   
                                  • Brian

                                    Brian - 2014-10-27

                                    thanks Simon didn't think about that one

                                    Intrinsic word table was successfully updated
                                    Reserve word table was successfully updated
                                    zz110-GAWCH: Oops, zero length word
                                     Report this to support
                                    cobxref.cbl: 1588: libcob: Length of 'wsFoundWord2' out of bounds: -1109
                                    
                                     
                                • Vincent (Bryan) Coen

                                  I thought it was in free format... Yes it is so why did you set fixed on a free format source file?

                                  The options of fixed and free ARE important as it controls the way the program works at least until it finds the 1st instance of:
                                  >>source fixed/free

                                  etc

                                  Now saying that, it looks like it has not processed the directive correctly as that should not happen ...

                                  In my test of using it with itself and using fixed the list file go to page 300+ before I cancelled the run while it had gone through the 9 levels of copy books trying to find itself ?

                                  but as printcbl had the wrong parameters it is hardly a bug.

                                   
    • Brian

      Brian - 2014-08-07

      thanks Vince for your effort !
      if it works out I'll be happy as a clam

       
  • Vincent (Bryan) Coen

    In the meanwhile I have now had a look at cobxref (1.01.07) or in my case 1.01.10 and have found the paragraph area where it is broken which is aa047-GetIO along with the next few paras spec'd as aa047-xxxx as I inserted a 'go to aa047-getio' at the end of the 4 if statement blocks so it is happening during looking for the word after ASSIGN and up to the statement end period.

    Now to try and work out what is causing it exactly, eye sight permitting.

    More later ..

     
  • Vincent (Bryan) Coen

    Regarding printcbl:

    Bug fixed regarding usage of compiler directive >>source.

    This now allows Brian to incorrectly supply "fixed" to the program instead of 'free' when running printcbl against itself. I will re-issue the program as v2.01.14 and is be available at:

    http://www.applewoodbbs.dtdns.net/files/printcbl-latest.zip

    I will also upload the changes to the contrib area in due course.

    Now back to working on cobxref...

     
    Last edit: Vincent (Bryan) Coen 2014-11-03
    • Simon Sobisch

      Simon Sobisch - 2014-11-01

      You need an svn checkout first, in the case of contributions the correct cammnd (including URL) would be:

      svn checkout --username=*youruser* svn+ssh://*youruser*@svn.code.sf.net/p/open-cobol/contrib/trunk gc-contrib
      

      or if you only want to have the tools the following command/url would be enough:

      svn checkout --username=*youruser* svn+ssh://*youruser*@svn.code.sf.net/p/open-cobol/contrib/trunk/tools gc-contrib-tools
      

      Then do your updates to existing tools, cd into each tool you changed, do 'svn status' / 'svn diff' there to verify your changes [and, if a Changelog file is included it's changed, too] and a 'svn commit' afterwards. Committing each tool on it's own is a good idea ;-)

      If you wand to add a new tool go to gc-contrib/tools, copy the new folder there, do 'svn add newtool', change into the directory, check everything with 'svn status/diff', issue 'svn delete somejunk' if there's something in the list you don't want to commit, change to gc-contrib/tools again and do 'svn commit newtool'.

      Any further questions?

      Simon

       
      • Vincent (Bryan) Coen

        That sorted the issue (I hope).

        Did try and use a gui version kdesvn but it is not too imporessed trying to linmk to the contribs area so stuck with your way.

        Vince

         
        Last edit: Simon Sobisch 2014-11-05
  • Vincent (Bryan) Coen

    Regarding cobxref bug now found and hopefully fixed well at least testing here has confirmed it and it now run through cobc (v2.n) with -X and works running the source code directly.. A few more tests and I will upload the latest release which is now v1.01.11.

    The v1.01 series will be superseded by v1.02 which will include the code from printcbl to support the COPY library system allowing a total depth of 9 COPY's which exceeds the cobc processing of 4.

    There will be some proviso's no doubt but hopefully wil cover most users requirements,

    In the meanwhile it will help if programmers who have created complete applications using copy books can run the latest printcbl currently available via my website (until I get a chance of uploading latest sources to the contrib area) to play with it. Your can get it at:

    http://www.applewoodbbs.dtdns.net/files/printcbl-latest.zip

    More as I get it (ok, or produce it).

     
    • Brian

      Brian - 2014-11-03

      really good news.
      thanks a lot as usual

      best wishes,
      Brian

       
  • Vincent (Bryan) Coen

    Latest copies of printcbl v2.1.14 and cobxref v1.1.11 have been committed to the contrib repository also have added Steve Williams changeformat v1.0.2 tool that will convert a Cobol source program to/from fixed|free formats. I will when time permits have a look at it to see if it can do all programs/files in a given directory creating the changes into another directory (at the same level) as I see a use when converting a large amount of copy books.

    Also updated is the cobxref project on sf along with the sources and an initial version of cobxref for IBM MVS 3.8J's Ansi Cobol. This is a work in progress with the DMAP feature that still needs some work.

    As stated before cobxref v1.1.11 will be the last version without COPY verb support but I need users to test printcbl before I start to migrate the copy verb coding over to cobxref v1.2 along with more support for 'REPLACING LAST|FIRST" etc.

    So folks I need it testing with Cobc v2.n (and v1.1 if that's what you use) remember it will not only produce a report of the program source but if required will create a new source file containing all of the copy books used/called etc an ideal solution if you need to pass over to another your program that uses copy books for the sack of one additional source line at the beginning of the program..

    [Sales mode off: hmm, hold on its free]

    Comments/ bug reports etc, in this area please.

     
  • Brian

    Brian - 2014-11-05

    I still receive an error, more below:

    teldat.cob             Cobol Source Print (Prtcbl v2.01.14)        2014/11/05 10:51:48.02  Page   1
    Running with teldat.cob, teldat.list, Fixed, abc And
    Copy Path 01 = /export/home/brian/includes/
    
    printcbl.cbl: 1882: libcob: OCCURS DEPENDING ON 'Fht-Table-Size' out of bounds: 11
    WARNING - Implicit CLOSE of Print-File ('teldat.list')
    

    looking more into detail of the list file I noticed something interesting. maybe it's just me doing something wrong.
    where the first copy statement occurs instead of printing the copy it uses the cbl source file again.
    the path to the copies is the right one even placing the printcbl executable and source file into the copy dir results in the same error

    GnuCOBOL version 2.0 rev. 427
    OS: Solaris 10

     
    Last edit: Brian 2014-11-05
    • Vincent (Bryan) Coen

      Silly question but is the source in fixed format?

      Do you have compiler directive ">>SOURCE " present at the start or other points within your program, is the copy books the same format as the program and if not is compiler directive ">>SOURCE " present in them?

      Is all copy books used in program present in the path
      /export/home/brian/includes/ ?

      If all of the above questions correct please send me a archived copy of the program and all copy books to me
      You can use my email addr at vbcoen at gmail.com

      Regards this bit "

      looking more into detail of the list file I noticed something
      interesting. maybe it's just me doing something wrong.
      where the first copy statement occurs instead of printing the copy it uses the cbl source file again.
      the path to the copies is the right one even placing the printcbl
      executable and source file into the copy dir results in the same error"

      It does look if the format has change and the program does not know what the form is free/fixed and you have not specified what the program or a copy book is.

      Does your program compile using cobc without errors ?


      Vince

       
      Last edit: Simon Sobisch 2014-11-05
  • Vincent (Bryan) Coen

    I still need the source file/s you used so I can test it may be in debug mode to see what is happening.

     
    • Brian

      Brian - 2014-11-08

      sorry Vince have been pretty busy.
      I'm not able to provide university property but I'll try to reproduce the error.

       
  • Vincent (Bryan) Coen

    In light that no one has reported any errors for the latest releases of printcbl and cobxref (other than Brian who has not provided me with a source file that produces error) I will go ahead and integrate the printcbl copy coding into a new cobxref code named v1.2. This process will be delayed slightly as I have to remove tiling grouting and silicone and regrout/silicone my shower. It is a slow process. There really should be a easier and faster way of doing this !!

    Hopefully start sometime next week eye sight permitted.

    Meanwhile if there are programmers who have full projects/application in (GNU)Cobol that uses copy books please run code through the latest versions printcbl and likewise cobxref and report success or any issues.

    Would be nice to get an idea of number of users for each as it looks like it is single digits !

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks