View previous topic :: View next topic |
Author |
Message |
danm Intermediate
Joined: 29 Jun 2004 Posts: 170 Topics: 73
|
Posted: Fri Jan 12, 2007 10:49 am Post subject: parse source |
|
|
The third token of a interpret REXX 'parse source' command gives me the name of the EXEC. However, I got a "?" (unknown) when running the compiled code. Is there a way to get the name in the compiled code? |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Sun Jan 14, 2007 12:28 am Post subject: |
|
|
The documentation says, that if the name is not known or IF THE NAME IS AN EXTENDED NAME, the third token will be '?'. It goes on to say that if the extended name contains blank char (possible in a HFS dsname), blanks are replaced by x'00'.
so, maybe you tested the interpreted from a different lib than the compiled, and maybe the compliled is located in an 'extended name' dsn.
The documentation goes on to talk about the parameter blocks which you can access.
The documentation does not mention any issues between compiled and interpreted.
hope that helps. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Sun Jan 14, 2007 12:30 am Post subject: |
|
|
adding a bit to the above:
Quote: | The documentation says, that if the name is not known or IF THE NAME IS AN EXTENDED NAME, the third token will be '?'. It goes on to say that if the extended name contains blank char (possible in a HFS dsname), blanks are replaced by x'00'.
|
possibly your are not handling the the x'00's properly if they are in the third token. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Sun Jan 14, 2007 12:51 am Post subject: |
|
|
and here is some more. This code is copied from the following link:
http://groups.google.com/group/bit.listserv.tsorexx/msg/f04d77cbf76b9cf6
this is something from Doug Nadel, very, very experienced.
Code: |
Parse Source . . name dd ds . /* get known info */
Call listdsi(dd 'FILE') /* get 1st ddname from file */
Numeric digits 10 /* allow up to 7FFFFFFF */
If name = '?' Then /* if sequential exec */
answer=''''ds'''' /* use info from parse source */
|
in the above example, PARSE SOURCE has 6 tokens. When a '?' is encountered in the third token, values from the 5th are used. (don't ask me, I have no idea - too much info for this early in the morning). Having code to provide an alternate to a '?' tells me, receiving '?' in the 3rd token is not 'unheard of'. The comment 'if sequential exec', honestly escapes me, but I do not have Doug's experience. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
|
|