Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load issue after update to 10.00.9282.8 SR4

Hi,

Just updated to version 10.00.9282.8 SR4 and now some program don't work anymore.

I found out that it has to do with the LOAD statement of text files.

I used to have below statement which worked ok:

LOAD Text(Trim(MATNR)  as item

FROM

[marc.txt] ( txt, codepage 1252, embedded labels, delimiter is '|' header is 3 lines)

WHERE (WERKS='PB01')

But after the update it crashes, I recreated the statement by using the wizard and now it seems that the fieldnames have trailing blanks! so the statement becomes:

LOAD Text(Trim([MATNR     ])  as item

FROM

[marc.txt] ( txt, codepage 1252, embedded labels, delimiter is '|' header is 3 lines)

WHERE ([WERKS ]='PB01')

Is there some (new) setting which defines that trailing blanks can be ignored? Otherwise I have to rebuild a big number of programs

Br

Arend

LOAD Text(Trim([MATNR               ])) as MATNRd
FROM

(txt, codepage is 1252, embedded labels, delimiter is '|', header is 3 lines)
WHERE([WERKS ] = 'NL11');
12 Replies
Not applicable
Author

I found out that I can prevent this by removing the SET Verbatim =1 in my programs. But when I do that also leading and trailing blanks from my data is removed which is unwanted. strange thing is that it did work before ...

stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

Is your code here verbatim or did you type it in?

Just wondering because there are errors in it - missing close brackets and commas:

This works for me in v10, even with additional spacing:

LOAD Text(Trim(MATNR))  as item

FROM

[marc.txt] ( txt, codepage is 1252, embedded labels, delimiter is '|', header is 3 lines)

WHERE (WERKS='PB01')

The wizard does come back with the additional spacing in the field names and this is technically correct.

Regards,

Stephen

Not applicable
Author

Stephen I typed it in: below is my actual source

SET Verbatim=1;

LOAD Text(Trim([MATNR               ])) as MATNRd
FROM

(txt, codepage is 1252, embedded labels, delimiter is '|', header is 3 lines)
WHERE(trim([WERKS ]) = 'PB01');

Like I stated if I remove the Set Verbatim then I can also remove the brackets, but it will also influence my data.

below is a piece of the data I try to read:

Table:          MARC

Displayed Fields:   8 of   8        Fixed Columns:                 2      List Width 1023

---------------------------------------------------------------------------------------------------

| |MATNR               |WERKS |PLIFZ|MINBE            |STAWN              |HERKL|PRCTR     |SERNP |

---------------------------------------------------------------------------------------------------

| |0-0034322-0         |PB01  | 1   |           0,000 |999999             |     |SER01     |      |

| |0-0122-02           |PB01  | 1   |           0,000 |999999             |     |SER01     |      |

| |0-169-60            |QP11  | 7   |           0,000 |84314980           |     |SER01     |      |

| |0-169-60            |QP12  | 7   |           0,000 |84314980           |     |SER01     |      |

| |0-169-60            |QPM1  | 1   |           0,000 |84314980           |     |SER01     |      |

| |0.07.29.6029.05     |PB01  | 1   |           0,000 |999999             |     |SER01     |      |

| |0.10.29.6069.01     |PB01  | 1   |           0,000 |999999             |     |SER01     |      |

| |0.13.29.6004.3      |PB01  | 1   |           0,000 |999999             |     |SER01     |      |

| |0.13.29.6007.3      |PB01  | 1   |           0,000 |999999             |     |SER01     |      |

| |0.390.242.309       |PB01  | 1   |           0,000 |999999             |     |SER01     |      |

| |0.5IPU10            |QP11  | 1   |           0,000 |999999             |     |SER01     |      |

stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

I wouldn't be trying to parse your data using the delimiters.  I would be using Fixed Record:

LOAD

     @4:23 as MATNR,

     @25:30 as WERKS,

     @32:36 as PLIFZ,

     @38:54 as MINBE,

     @56:74 as STAWN,

     @82:91 as PRCTR,

     @93:98 as SERNP

FROM

marc.txt

(fix, codepage is 1252, embedded labels, header is 3 lines)

Where [@25:30] = 'PB01';

That should solve your problem.

Regards,

Stephen

Not applicable
Author

Stephen,

Nothing wrong with you're reply, thanks for that.

My biggest issue is that it always worked perfectly and this is changed now. And because of that all my programs don't work anymore.

Arend

stephencredmond
Luminary Alumni
Luminary Alumni

Hi Arend,

Your code:

LOAD Text(Trim(MATNR))  as item

FROM

[marc.txt] ( txt, codepage is 1252, embedded labels, delimiter is '|', header is 3 lines)

WHERE (WERKS='PB01')

(with fixed errors)

Works for me in v10 with a copy of your data.

Regards,

Stephen

Not applicable
Author

Did you use the SET Verbatim=1?

stephencredmond
Luminary Alumni
Luminary Alumni

No, I didn't specify SET Verbatim at all.

If I do change it to SET Verbatim=1 then it fails.  If I leave the SET but change it to 0, it works again.


Regards,

Stephen

Not applicable
Author

Ok, but then problem is if you set Verbatim=0 then also trailing and especially leading blanks in the data itself is removed when you load it meaning '     TEST' will be equal to 'TEST   '