2019 R2 Tracefield Issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 2019 R2 Tracefield Issue

    Good morning all,

    I am having an issue with 2019 r2 not playing so nice with one our our tracefields. We have this set up on all of our programs (all of our other machines are on 2017 r2 for the time being). This is the only tracefield failing and we have a bunch in there. I wasn't sure if this is a known bug in 2019 or if the way they were handled was changed in this version. It basically reads a file and sets the CMM number for SPC reasons. I have attached code below. It keeps giving me error of tracefield being too long. The max characters for the tracefield is set at 15 and there are only 5 characters in the .txt document.

    Code:
    CMN          =COMMENT/INPUT,NO,FULL SCREEN=NO,
                  'CMM NO:'
                  ASSIGN/SETID="CMM " + CMN.INPUT
    FPTA         =FILE/OPEN,C:\SETCMM.TXT,WRITE
                  FILE/WRITELINE,FPTA,SETID
                  FILE/CLOSE,FPTA,KEEP
                END_IF/
                ASSIGN/IDFILE="C:\SETCMM.TXT"
    GETCMMNO   =FILE/OPEN,IDFILE,READ
    SETID      =FILE/READ_BLOCK,GETCMMNO,5
                FILE/CLOSE,GETCMMNO,KEEP
    
    
    TRACEFIELD/DISPLAY=NO,REPORT=NO,DISPLAY MESSAGE=CODE_APP ; CODE_APP : SETID


    Thanks.
    Last edited by HxSwartwood; 11-04-2019, 11:37 AM.

  • #2
    can you show what the contents of the file ("C:\SETCMM.TXT") looks like? Would like to test things.

    Comment


    • SABarber
      SABarber commented
      Editing a comment
      Code:
      FPTR       =FILE/OPEN,"C:\SETCMM.TXT",READ
      INNAME     =FILE/READ_BLOCK,FPTR,5
                  FILE/CLOSE,FPTR,KEEP
                  COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                  "I read (" + INNAME + ")"
                  "A length of " + LEN(INNAME)
                  TRACEFIELD/DISPLAY=NO,REPORT=NO,DISPLAY MESSAGE=CODE_APP ; CODE_APP : INNAME
      seems to work for me. I created my own SETCMM.TXT file via NOTEPAD

    • HxSwartwood
      HxSwartwood commented
      Editing a comment
      it's looking like a permission's issue. Thank you for testing this out to rule a known bug out!

    • SABarber
      SABarber commented
      Editing a comment
      Win10 is very protective with files at C: root. Maybe use public documents area? I had to force the file to be in your path.

Related Topics

Collapse

Working...
X