Characters not being shown in BC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • misi01
    Old Hand
    • Jun 2005
    • 210

    Characters not being shown in BC

    I'm running BC 3.3.13 on Windows. First of all, I should point out that this is not a big deal.

    Background. I've written my own plug-in in Reginald Rexx for mainframe files created in a product called Mainframe Express (MFE). MFE creates "mainframe" files on the PC so you can run mainframe JCL and debug Cobol programs. I've been using this plug-in for some years now with great success. The other day, however, I was comparing 2 before-and-after files and was surprised to to see loads of data converted, but then being shown with "missing" hex values (you can see this in the new_vs_old screen capture (SC) at the bottom). The MFE_file_contents SC shows what's actually in the file (albeit, in EBCDIC) and the weirdest (?) thing is that the new_vs_new SC shows the contents of the file as I expected to see on the one side in the new_vs_old SC.

    I was suprised enough that I mucked around with it at home and could confirm that my plug-in reads the relevant records and translates them from EBCDIC to ANSI correctly. Any thoughts on what might be happening?
    Attached Files
    Last edited by misi01; 11-Oct-2017, 06:56 AM.
  • misi01
    Old Hand
    • Jun 2005
    • 210

    #2
    Sorry - this should have been appended to the BC3 discussion. Please move there instead.

    Comment

    • Aaron
      Team Scooter
      • Oct 2007
      • 16002

      #3
      Hello,

      Thanks for the info. If you perform the conversion manually, external of BC3, and then open those temp files in BC3, does the issue reproduce?

      If this reproduces, can you email the temp.txt files in to [email protected] along with a link back to this forum thread. Please also email in your BCSupport.zip from the Help menu -> Support; Export.

      Update: have you performed any Font customization, like coloring for Unimportant differences?
      Last edited by Aaron; 11-Oct-2017, 11:52 AM. Reason: Update
      Aaron P Scooter Software

      Comment

      • misi01
        Old Hand
        • Jun 2005
        • 210

        #4
        Interesting !!!!!

        I ran my conversion program and created an old.txt and a new.txt. Look how the old file is shown as expected, when I only open that file. Now look what happens when I open the new file as well !!! I'll append the txt files as well.

        Note also that I ran the program at home with the 2 files directly in BC with no problems (both files shown as expected). From what I could see, the BC versions are the same at work and at home
        Attached Files

        Comment

        • Aaron
          Team Scooter
          • Oct 2007
          • 16002

          #5
          I think you may have a customized font (such as Unimportant Text = White). Can you email in that BCSupport.zip from the Help menu -> Support; Export to [email protected] ? Using the default settings, comparing the files shows the text.
          Aaron P Scooter Software

          Comment

          • misi01
            Old Hand
            • Jun 2005
            • 210

            #6
            Thanks for your suggestions. I "solved" it myself based on your suggestion, inasmuch as I started by selecting Tools, Options, Compare colors and clicking on Factory reset. Voilà, the "missing" characters were shown. I then changed the color setting for Unimportant differences to Window Text and that way, any unimportant differences don't catch my eye and distract me.

            Thanks for pointing me in the right direction.

            Comment

            • Aaron
              Team Scooter
              • Oct 2007
              • 16002

              #7
              Hello,

              Instead of customizing the font, use the toolbar toggle to "Ignore Unimportant Differences". This changes any 'blue' text to 'black' and treats it as equal.
              Aaron P Scooter Software

              Comment

              • misi01
                Old Hand
                • Jun 2005
                • 210

                #8
                Thanks Aaron. I see what you're writing (as opposed to I hear what you're saying ) but without setting it to Windows Text, pressing the Ignore unimportant differences is one extra interaction I theoretically have to remember to perform.

                On the other hand, setting it to Windows Text from the very start does what I'm after inasmuch as I don't care about unimportant differences.

                Anyway, thanks for the (usual) speedy reply and help.

                Comment

                • Aaron
                  Team Scooter
                  • Oct 2007
                  • 16002

                  #9
                  Just as additional information, the toggle is sticky, so it would remember the last used (enabled) position. That way you can control if the text is considered Different or Equal (otherwise, Show Differences will still show the text, but in this case might be large blank, confusing areas).
                  Aaron P Scooter Software

                  Comment

                  • misi01
                    Old Hand
                    • Jun 2005
                    • 210

                    #10
                    Thanks Aaron, I hadn't realized that. In that case, I'll go with your suggestion instead (and basically use the factory settings for the various colours).

                    Comment

                    • Aaron
                      Team Scooter
                      • Oct 2007
                      • 16002

                      #11
                      If anything else is confusing about the display, coloring, or how the comparison criteria works (important vs unimportant and filtering the view), just let us know and we can help. The overall goal is to define Grammar elements to match on specific text sections, that grammar can then be Important or Unimportant. The Display Filters can filter to show Everything, Differences, or Same text, and Unimportant Differences can be considered Differences (Blue) or Equal (Black) depending on the Ignore Unimportant Differences toggle. Important Differences are always Differences.
                      Aaron P Scooter Software

                      Comment

                      • misi01
                        Old Hand
                        • Jun 2005
                        • 210

                        #12
                        Thank you again, Aaron. Funny you should append this comment, because there is something I STILL don't understand (I appreciate that for you guys, this is blatently obvious, but based on the forum append below, there is/was at least one other person who was also having problems).

                        I refer to the following forum append https://www.scootersoftware.com/vbul...hlight=grammar

                        I also include a screen capture of my files as well as my file formats. I don't understand what I'm supposed to do to get BC to ignore consider columns 1-6 and 73-80 as unimportant.
                        Attached Files

                        Comment

                        • Aaron
                          Team Scooter
                          • Oct 2007
                          • 16002

                          #13
                          A full screen screenshot of the Text Compare window (showing the red text) might help.

                          The first thing to look for is in the upper status bar of each pane: this shows the detected File Format name. Is the correct format detected and used?

                          Next, click into the text (say, around position 3 or 4, so the cursor is blinking and sitting inside the section). The bottom status bar of each pane will show the detected grammar element name the cursor is within. Is this detecting as Col1_6?

                          Assuming the format is correct and the grammar is matching, you then need to go to the Session menu -> Session Settings, Importance tab, and uncheck the grammar element name. Checked items are Important, and Unchecked are Unimportant. This can apply for just the current view, or at the bottom of the dialog change the dropdown to Also Update Session Defaults to apply to future views/sessions.

                          That should get the text to be blue/black instead of red.
                          Aaron P Scooter Software

                          Comment

                          • misi01
                            Old Hand
                            • Jun 2005
                            • 210

                            #14
                            A full screen screenshot of the Text Compare window (showing the red text) might help.
                            That was the idea behind the screen capture above. The difference was in the right pane, left-hand columns (the text 123456).

                            Is this detecting as Col1_6?
                            No - I'll include a full screen capture of the current comparison

                            It seems to me that we've been down this road some years ago when I probably had the same problem/misunderstanding.

                            What I hear you saying is that whether text strings (via grammar rules) are considered important or unimportant is dependent on the session settings. IF that is correct, it doesn't seem intuitive to me.

                            For me, logically, I define grammar rules based on the type of file (CBL in this example)- I then expect those rules to be applied for ALL CBL files, irrespective of any session settings.

                            ... or am I completely missing the point (ie, I can't see what session settings and file types with their associated grammar rules have to do with each other).

                            I include the screen capture for my current comparison. Note that, compared to the SC above, THIS time, for some reason, if I unmark theIgnore unimportant differences, the string 123456 is suddenly shown in blue and marked as different as per the second SC.
                            Attached Files

                            Comment

                            • Aaron
                              Team Scooter
                              • Oct 2007
                              • 16002

                              #15
                              Sure thing. Note that in the screenshot, your example text is matching on "Comment" as the grammar element. This is because of the * character after 6 leading characters. The COBOL format includes a Comment element that will match this definition*. If you remove the *, then the text behaves as you expect. If you must keep the *, you can use the Comment definition as Important or Unimportant or delete the Comment grammar element to further customize your format.

                              As for the toggle behavior, that looks like what I would expect. Comments are Unimportant by default, so if the toggle is Off, then Unimportant is *not* ignored, so it would be a blue unimportant Difference. If you toggle On, then it is set to Ignore it, changing it to black (equal) text.
                              Aaron P Scooter Software

                              Comment

                              Working...