0

I'm trying to recover Strings from a .txt file with the bsfn B76B0220.FetchNextLineFromFlatFile

When the text is recovered the String should looks like this:

170015560220171030070567000400000

Instead of that the String recovered is this one:

㜱〰㔱㘵㈰〲㜱〱〳㜰㔰㜶〰㐰〰〰രㄊ〷㄰㔵〶㈳㄰ㄷ㌰〰〷㘵〷〰〱〸〰਍㜱〰㔱㘵㔰〲㜱〱〳㜰㔰㜶〰㜰㘵〰രㄊ〷㄰㔵〶㈶㄰ㄷ㌰〰〷㘵〷〰㠰〴〰਍㜱〰㔱㘵㜰〲㜱〱〳㜰㔰㜶〰〰㜰〵愰††††††††††††††††††††††††††††††††ഠਠ

Here is my code:

VA rpt_VA_PATH = "C:\Users\User\Desktop\Fichero.txt"
Fetch Next Line From Flat File
       VA rpt_VA_PATH -> BF szFlatFileName
       VA rpt_VA_GENLNG <> BF idFilePtr
       "1500" -> BF mnRecordLength
       VA rpt_VA_ERROR_CODE <- BF cErrorCode
       VA rpt_VA_ACTUAL_LINE <- BF szFlatFileRecord

I think that the problem is related with the file codification(UTF8, ansi, etc..)
Thanks for the help.

rencinas
  • 142
  • 1
  • 8

2 Answers2

1

Depending your JDEdwards release it will expected to read and write in UNICODE encoding.

On this cases you could use the application P93081 to set the text encoding that your APPL/UBE will use.

lhdv
  • 146
  • 1
  • 6
0

Found the solution!

As I though, the problem was related with the codification, the BSFN expected an "unicode" txt, and the file was UTF-8

By the way, with the BSFN B43A1010 always saves the file as "unicode".

Save As Notepad

rencinas
  • 142
  • 1
  • 8
  • "Always saves the file as Unicode" seems to be **exactly the opposite** of the picture you posted. It shows that you can save as ANSI, Unicode, Unicode big endian, or UTF-8. Do you mean that the **default** is Unicode? –  Nov 20 '17 at 15:48
  • I was meaning about the **Business Function(BSFN)**, it always saves the file as Unicode. The ScreenShot shows the **Windows Explorer** when I was saving a `.txt` from the notepad, not from the JDE menu – rencinas Nov 21 '17 at 13:15
  • OK, got it! Thank you for clarifying. –  Nov 21 '17 at 14:19