Menu

MF COBOL $ options before the Identification Division

2024-03-28
2024-03-29
  • Cathy Welsh

    Cathy Welsh - 2024-03-28

    Is there a way to interpret the items that we put in the top of every single program that ran throught the MF compiler. These are the 4 items that we used. Yes most of the Code is only Cobol 85 standard and even COBOL 77 standard as it was written for a PDP-11 on RSX-COBOL. since we supported so many different Operating systems for quite some time, we kept the code in that ancient version, and it worked. But when the 3800 programs were initially written the programmer created a routine called ENTRY that is called in all 3800 programs so many times. One of these $ things in MF COBOL allowed us to remove that from the COBOL Library. So I know what the first one does. Not sure what the 2nd and 3rd one does off the top of my head, buyt the last one has to do with various MF COBOL routine calls,, such as gettting enviroment variables, that it knows the rtncode-size is (4) bytes.

      $ SET REMOVE "ENTRY"
      $ SET COPYLIST
      $ SET REF
      $ SET RTNCODE-SIZE(4)
    

    With gnucobol, are these sort of options available, or am I going to have to painstakingly remove every one of these and change entry in the programs that probably occurs in the 3800 programs over 2 million times, to something like entry-routine.

    I know that gnucobol does not acknowledge these, because I compiled one of my Screen handler programs, and it errored out on the 4 lines above, and once I removed these 4 lines, the program compiled, as that particular program did not have any "ENTRY" calls in it.

    The owners of this company have no idea how much time this is going to take me, because it is just me.

     

    Last edit: Simon Sobisch 2024-03-29
    • pottmi

      pottmi - 2024-03-28

      Cindy,

      If you don't need the code to compile again on microfocus it is pretty trivial to write a script to remove them.

      If you need them to compile on microfocus then I think there is a way to make the $SET statements look like a comment to other compilers.

      Feel free to send me an email to get some help with scripting this.

       

      Last edit: Simon Sobisch 2024-03-29
    • Ralph Linkletter

      Delete the 4 lines or I would just make them comments - Add * in column 7
      Removing the keyword ENTRY might require you to find the GnuCOBOL -f option to remove a reserved word.
      I would try some compiles - see if ENTRY actually causes a compiler error.
      The rest of the $SET statements seem harmless

       

      Last edit: Ralph Linkletter 2024-03-29
    • Simon Sobisch

      Simon Sobisch - 2024-03-29

      Some of these are implemented - for example REMOVE, some are not important and should be ignored (you may get a warning, but ignore those or filter them out is fine.
      If you find something that is very important and missing, then we may be able to add this.

       
  • Simon Sobisch

    Simon Sobisch - 2024-03-29

    Just rechecked with the TESTSCROLL.cbl file uploaded in the other thread: $ on col 7 will error you'd need to adjust one source file to allow it or move those to col 8, where they will also work with MF.
    Before GnuCOBOL 3.2 you need to have $SET (= one word), with GC 3.2 you can also use $ SET.

    ...but at least on the machine where I've tested, $SET REMOVE crashes the compiler... as a workaround comment that line and use -fnot-reserved=ENTRY instead.

     

    Last edit: Simon Sobisch 2024-03-29

Anonymous
Anonymous

Add attachments
Cancel