RDSEQ NOT READING LINE CORRECTLY

SOLVED

Hi, 

We are planning on upgrading our system from V11 to V12 P29. One thing I noticed is that sage is not able to detect a new line when reading the trace file. When I read the trace file, sage thinks that everything is in 1 line when it is not. Is anybody else experiencing this issue? Does anybody have any ideas on what I can possibly try to resolve it?

Subprog EXECIML(IMPTEMP, FNAME, MESSAGE)

Value Char IMPTEMP
Value Char FNAME

Variable Char MESSAGE () ()

# Start the trace
Call OUVRE_TRACE ("EXECIML "-IMPTEMP) From LECFIC

Call IMPORTSIL(IMPTEMP, FNAME) From GIMPOBJ

# end/write the trace
Call FERME_TRACE From LECFIC

# open the trace file to get the details
Openi filpath("TRA",GTRACE,"tra",0) Using [ZZZ]

Local Integer I : I = 0
Local Integer LISTMAX : LISTMAX = 100

Local Char XLINE(100)
# read the file
Repeat

Rdseq XLINE Using [ZZZ]

If left$(XLINE,11)="Creation of"
MESSAGE = 'SUCCESS'
Openi Using [ZZZ]
End
Elsif left$(XLINE,59)=" You must finish this control in order to access this stock"
MESSAGE = left$(XLINE,59)
Openi Using [ZZZ]
End
Elsif left$(XLINE,2)="<0"
MESSAGE = MESSAGE+chr$(13)+chr$(10)+XLINE
Endif

If I >= LISTMAX : Break : Endif

Until fstat <> 0

# close the file
Openi Using [ZZZ]

End

Thanks

Chris 

Parents
  • 0

    Hi Chris, I don't understand your issue, can you please give a precise example?

  • 0 in reply to Bruno Gonzalez

    Hey Bruno, My issue is that the trace file is not being read correctly. It is concatenating all of the strings together. This was not an issue in v11 but is an issue with this new version for me. For example, my trace file would read like this: 

    #<AdxVL>@(#)%I% 06/09/2022 10:05:31 (ADMIN) EXECIML ZSDH
    ----------------------------------------------------------------------
    File Importing Sage\SAGEX3\folders\83197.txt
    ----------------------------------------------------------------------
    -------------------- Record No. 1 (Line Number 1)
    Creation of Delivery D-12167664

    1 records created

    Normal end of log file 06/09/2022 10:05:35

    When I try to read it useing rdseq, sage is reading it as 1 string so it would come back like this rather than it should be able to detect the new line...

    #<AdxVL>@(#)%I% 06/09/2022 10:05:31 (ADMIN) EXECIML ZSDH----------------------------------------------------------------------File ImportingSage\SAGEX3\folders\83197.txt------------------------------------------------------------------------------------------ Record No. 1 (Line Number 1)Creation of Delivery D-121676641 records createdNormal end of log file 06/09/2022 10:05:35

Reply
  • 0 in reply to Bruno Gonzalez

    Hey Bruno, My issue is that the trace file is not being read correctly. It is concatenating all of the strings together. This was not an issue in v11 but is an issue with this new version for me. For example, my trace file would read like this: 

    #<AdxVL>@(#)%I% 06/09/2022 10:05:31 (ADMIN) EXECIML ZSDH
    ----------------------------------------------------------------------
    File Importing Sage\SAGEX3\folders\83197.txt
    ----------------------------------------------------------------------
    -------------------- Record No. 1 (Line Number 1)
    Creation of Delivery D-12167664

    1 records created

    Normal end of log file 06/09/2022 10:05:35

    When I try to read it useing rdseq, sage is reading it as 1 string so it would come back like this rather than it should be able to detect the new line...

    #<AdxVL>@(#)%I% 06/09/2022 10:05:31 (ADMIN) EXECIML ZSDH----------------------------------------------------------------------File ImportingSage\SAGEX3\folders\83197.txt------------------------------------------------------------------------------------------ Record No. 1 (Line Number 1)Creation of Delivery D-121676641 records createdNormal end of log file 06/09/2022 10:05:35

Children