@lala , it's really hard to follow you, what you do and what you want. I think the suggestion of Jim is fine, and your problem is not in JSL but in file operations.
My feeling is that you shouldn't write binary data in a text file. If this would work, you should be able to re-read it, but this is not the case, JMP throws an errror.
Names Default To Here( 1 );
tem = {"000903", "999999"};
b = "0100";
c = "0000000000000000000000000000000000";
d = "";
j = 1;
For( j = 1, j <= N Items( tem ), j++,
a = tem[j];
theHex = "";
i = 1;
While( Substr( a, i, 1 ) != "",
theHex = theHex || Hex( Substr( a, i, 1 ) );
i++;
);
d = d || b || theHex || c;
);
Show( d );
Show( "d = 0100303030393033000000000000000000000000000000000001003939393939390000000000000000000000000000000000" );
filename = Save Text File( "TEMP\try1.dat", Hex To Blob( d ) );
text = Load Text File( filename );
Show( (Blob To Char( text )) );
Georg