MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

parse source

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
danm
Intermediate


Joined: 29 Jun 2004
Posts: 170
Topics: 73

PostPosted: Fri Jan 12, 2007 10:49 am    Post subject: parse source Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Sun Jan 14, 2007 12:28 am    Post subject: Reply with 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'.

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Sun Jan 14, 2007 12:30 am    Post subject: Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Sun Jan 14, 2007 12:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group