Hi all,
I faced one issue while I run some customized code on batch, which I felt a little strange.
Edt var; // Edt of string length 2
var = substr(Conpeek(fileRecord,1),1,3);
For the above piece of code
As much I know, even if we give 1,3(String size 3) for the function substr the variable var should accept the size 2 !!
But the behavior in batch was strange it was accepting string size 3.
I had data in fileRecord’s first position “FR ”
When I fetched in batch var accepted value “FR “-String with a blank space on 3rd position and definitely .net considers blank space as string value which resulted in a wrong output for me.
Can anyone have any explanation for this, does our EDT properties are ignored in Batch??
*This post is locked for comments
Hi Abhida
Let me know if my reply isn't clear or if you have need more details.
Hi Abhida
Take a look at msdn.microsoft.com/.../cc584291.aspx, "X++ Strings Declared with a Maximum Length" section.
Practically, in Batch ( CIL ), the X++ String type become System.String
The System.String type in .NET Framework does not have a property that corresponds to the maximum length of an X++ str, and string truncation does not occur.
Mohamed Amine Mahmoudi
100
Super User 2025 Season 1
Community Member
48
Zain Mehmood
6
Moderator