cancel
Showing results for 
Search instead for 
Did you mean: 

How can I find a 'FF' or 'CR'

Former Member
0 Kudos
82

I am reading in text files to populate DataWindows.

When reading a line with FileRead or FileReadEx, CR's and LF's are dropped and the text line data is returned properly.

However, if a CR (0d) followed by a LF (0a) and a FF (0c), the FF is also dropped.  This is not according to PB Help.

How can I detect the FF's so I can create a new page. 

I need to also detect random CR's.

I have tried a zillion things, even going back to Funcky32 with no luck.

How can I read and detect a HEX character, specifically, FF's and possibly CR's when reading a text file?

PB 12.5

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Frank;

  Along with what John suggested .. also have a look at the Tilde (~). Its a powerful way to set variables to various values and then use it in the POS ( ) method to locate things in a Blob or VarChar.

ie:

String    ls_look

ls_look  =   "~h0C"

HTH

Regards ... Chris

Answers (1)

Answers (1)

Former Member
0 Kudos

You may have to open the file using StreamMode!, read the entire file into a string or blob and parse the lines yourself.