Here's the call:

$datepos = system ("rexx", "fmtscan.rex", "$fn", "$datefieldname", "P" +)/256;
I have used the debugger to confirm that the parameters are correct at this point in the perl script, and I have confirmed that the REXX script I'm calling is returning the correct value.
What I want is 303, but what I get is 47.

The highest value the program will properly return is 255, which leads me to think that only two bytes (since it get divided by 256) is used for the return value, which reverts to zero once 256 is reached.

Also 303-47 = 256

Assuming this is correct, I suppose I have two distinct questions:

  1. How could I capture a return value from a system() call that is greater than 255?
  2. Why does system() return the proper value multiplied by 256 anyway? Is that an insurmountable consequence of the architecture? It just seems to serve no purpose at all...
Problem that shouldn't exist don't challenge me so much as they just piss me off.

Although I am running NT4.. (grumble,complain)

Any thoughts?

==
PiEquals3, whose web-based (ackthpt!) email service went down and left him unable to access his cryptic login password.. :(
==


In reply to Annoying system() limitations by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.