RATE THIS ANSWER
0
Click to Vote:
0
0
Last Answered:
Jul 3 2008 2:59 PM GMT
by Sloopy
I can see that the system() command requires a *string type variable (that is, a null-terminated string - one that ends with hex '00').
You are passing it an RPG varying string - one whose length is given by a length attribute. RPG will pass the data part of the string, without the two-byte length part, which system() would not have understood anyway.
So, what you need to do is add the X'00' to the end of your string:
command = 'CRTDIR \XMLDATA' + path + X'00';
Et voila! As Del Boy would say, you should have liftoff.
Sloopy, after a long lunch.