Comments (8)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 6X87_Graham_Harris commented Permalink

2048 character limit was an absolute & total spoiler, when trying to use BPXWUNIX to invoke a java program (that I happened to have) to grab reports from RMF3 DDS, some reports from which have EXTREMELY long uninterrupted lines of characters, which just end up getting truncated. It wasnt many lines that were culprits, but it was enough to destroy the XML format, and make it all a bit of a mess to deal with. Eventually managed to construct a direct http REXX routine to grab a DDS XML stream directly into REXX, so problem solved.....albeit with many headaches along the way.

2 MartinPacker commented Permalink

Thanks, Graham. And I was about to experiment with Java processing XML as a good use case for BPXWUNIX. So you've taught me one thing: XML being a case where the 2048 limit matters. I'm going to investigate this one. I suspect, though, a new limit of 4096 wouldn't help very much. (I note you said "it wasn't many lines that were culprits", but I suspect they might - in extremis - bust e.g. 4096.) No promises but let me understand where the limit comes from and see if it's feasible to raise it. I'm not sure if I can share the answer, though.

3 MartinPacker commented Permalink

So, I talked to Bill Schoen in Development. He pointed out the 2048 byte limit was the same as LE's LINE_MAX value. And dealing with this is a known requirement.

4 AidanH commented Permalink

I use the following in Rexx in TSO to identify duplicates in the first field of the INDD dataset using the power of the Unix 'uniq' command combined with Awk <div>&nbsp;</div> cmd="awk '{print £1}' | uniq -d" <br /> call bpxwunix cmd,"DD:INDD",filter.,stderr. <div>&nbsp;</div> As you can see I use £ in place of $ - I have yet to figure out what I should use in place of ~ (tilde) so that I can use RegExp commands in awk like "awk '£1 ~ /[a-z]/ print "Lowercase chars found in record no." NR }'"

5 MartinPacker commented Permalink

Thanks AidanH (whoever you are). :-) <div>&nbsp;</div> I've just got the early draft of Regular Expressions Cookbook, 2nd Edition ( Maybe it'll give some insight into the problem you mentioned. Can't look at it in a hurry, though. :-(

6 AidanH commented Permalink

I've discovered that if I issue the LANG= command, then I can change the locale to one that Unix expects. For example in Rexx <div>&nbsp;</div> cmd="echo 'This is ABC' |", <br /> "LANG=En_GB.IBM-285 awk '$3 ~ /[A-Z]/ {print $1}'" <div>&nbsp;</div> This means that I can now use the full functionality of Unix power tools such as Awk and Sed in Rexx, both of which support Regular Expressions (RegExp). <div>&nbsp;</div> The above simple example pipes the string 'This is ABC' into Awk. Awk then uses a RegExp '~ /[A-Z]/' to pattern match field 3 which contains 'ABC' for uppercase letters and prints the contents of field 1. This can easily be extended to use RegExp processing for datasets, filtering out data that matches patterns such as upper or lowercase letters, numerics or non numerics, dates, or even to reformat data. <div>&nbsp;</div> With BPXWUNIX the power of RegExp is now available to Rexx. Awesome!

7 MartinPacker commented Permalink

Thanks Aidan! And now I've discovered this blog site has the "business card" capability I think I've figured out who you are and that you're on LinkedIn (and from Republic of Ireland).

8 AidanH commented Permalink

To check your locale enter the following command in Unix z/os <div>&nbsp;</div> locale -ck LC_SYNTAX <div>&nbsp;</div> With IBM-1047 <div>&nbsp;</div> LC_SYNTAX <br /> codeset="IBM-1047" <br /> backslash=\xe0 <br /> right_bracket=\xbd <br /> left_bracket=\xad <br /> right_brace=\xd0 <br /> left_brace=\xc0 <br /> circumflex=\x5f <br /> tilde=\xa1 <br /> exclamation_mark=\x5a <br /> number_sign=\x7b <br /> vertical_line=\x4f <br /> dollar_sign=\x5b <br /> commercial_at=\x7c <br /> grave_accent=\x79 <div>&nbsp;</div> With IBM-285 <div>&nbsp;</div> LC_SYNTAX <br /> codeset="IBM-285" <br /> backslash=\xe0 <br /> right_bracket=\xbb <br /> left_bracket=\xb1 <br /> right_brace=\xd0 <br /> left_brace=\xc0 <br /> circumflex=\xba <br /> tilde=\xbc <br /> exclamation_mark=\x5a <br /> number_sign=\x7b <br /> vertical_line=\x4f <br /> dollar_sign=\x4a <br /> commercial_at=\x7c <br /> grave_accent=\x79