initial string 
Author Message
 initial string

How can i get the initial string after i've started a program ?

es:

pkunzip  file.zip

how can i get the string  "file.zip"

please answer me



Thu, 05 Apr 2001 03:00:00 GMT  
 initial string
Your post seems to have been placed in the wrong newgroup.  It does not look
particularly relevant to IBM 370 assembler language.

The 'initial string' your are after may be in argc[0], if your are talking
about C Language programming on PCs. We can probably find some C tutorials for
you on the net.

E-mail me if you would like assistance finding the correct newsgroups. Or if I
have not yet understood your quetion, tell us how this relates to 370 asm.

If you instead are trying to find that 'initial string' in Intel i86 assembly,
the solution, although easy, will vary depending upon operating environment.
Again, we can find the tutorials or X86 newsgroup for you, if your are just now
finding your way around.

Robert Rayhawk



Thu, 05 Apr 2001 03:00:00 GMT  
 initial string

:>How can i get the initial string after i've started a program ?

:>es:

:>pkunzip  file.zip

:>how can i get the string  "file.zip"

I will answer for the case of TSO. Someone else can answer for CMS.

At entry to PKUNZIP register one points to a CPPL.

The first word of the CPPL points to a command buffer which has the format:

    Halfword Length
    Halfword Offset
    Command Text

Add the offset value + 4 (for the header) and you are pointing at the options.

         L     R2,0(,R1)            FETCH COMMAND BUFFER POINTER        
         LH    R14,0(,R2)           LENGTH OF BUFFER                  
         LH    R15,2(,R2)           OFFSET TO PARMS                  
         LA    R15,4(,R15)          ADJUST FOR RDW                    
         SR    R14,R15              LENGTH OF PARMS                  
         BNP   NOPARMS                NO PARMS                          
         AR    R15,R2               -> PARMS                        

--


Director, Dissen Software, Bar & Grill - Israel



Fri, 06 Apr 2001 03:00:00 GMT  
 initial string
The first parm is in argv[1], the rest of them, if any, are in
argv[2]...argv[n], n is the # of parms.  argv[0] is the command, argc is
the # of things in argv[].  (Delimiter is whitespace.)

Bob

Quote:

> Your post seems to have been placed in the wrong newgroup.  It does not look
> particularly relevant to IBM 370 assembler language.

> The 'initial string' your are after may be in argc[0], if your are talking
> about C Language programming on PCs. We can probably find some C tutorials for
> you on the net.

> E-mail me if you would like assistance finding the correct newsgroups. Or if I
> have not yet understood your quetion, tell us how this relates to 370 asm.

> If you instead are trying to find that 'initial string' in Intel i86 assembly,
> the solution, although easy, will vary depending upon operating environment.
> Again, we can find the tutorials or X86 newsgroup for you, if your are just now
> finding your way around.

> Robert Rayhawk




Fri, 06 Apr 2001 03:00:00 GMT  
 initial string
What's the answer for OMVS (or Unix Sys. Services)?  (It's a serious
question!)

Bob

Quote:

<snip>

> I will answer for the case of TSO. Someone else can answer for CMS.

<snip>
> --


> Director, Dissen Software, Bar & Grill - Israel



Fri, 06 Apr 2001 03:00:00 GMT  
 initial string
VERY Good!!!! Answer!

Reminds me of a MS joke.  Helicopter pilot in Washington state is
lost in the fog.  Flying close to a large tower, he holds up a
sign saying "Where am I?".  People in building hold up sign in
reply "In a Helicopter".  Pilot then flies direct to airport.
Questioned, he replied "Since I got a technically correct but
totally useless answer, I knew I was next to the MS support
building in Redmond, and from there the airport is located ..."

(I assume this is another x86 append, and I say all of the above
in humor, not to slight or offend.)

Quote:


> :>How can i get the initial string after i've started a program ?
> :>es:
> :>pkunzip  file.zip
> :>how can i get the string  "file.zip"

> I will answer for the case of TSO. Someone else can answer for CMS.

{snip}
--



Sat, 07 Apr 2001 03:00:00 GMT  
 initial string

: Reminds me of a MS joke.  Helicopter pilot in Washington state is
: lost in the fog.  Flying close to a large tower, he holds up a
: sign saying "Where am I?".  People in building hold up sign in
: reply "In a Helicopter".  Pilot then flies direct to airport.
: Questioned, he replied "Since I got a technically correct but
: totally useless answer, I knew I was next to the MS support
: building in Redmond, and from there the airport is located ..."

Even more apropos, this story used to be told with an IBM building
(perhaps the one in Chicago) as the central feature.

--

Columbus, Ohio



Mon, 09 Apr 2001 03:00:00 GMT  
 initial string

Quote:

> What's the answer for OMVS (or Unix Sys. Services)?  (It's a serious
> question!)

I couldn't find this documented anywhere. This is what it APPEARS to be:

  R1    => 7 fullwords

  R1+00 => fullword argc
  R1+04 => list of (argc) fullword argv pointers, each points
                to 4 byte len in front of null-terminated
                string. Length includes the null.
  R1+08 => list of (argc) fullword argv pointers, each points
                to the argv data (not to the length fields as
                the previous set of pointers do)
  R1+12 => fullword envc (count of environment variables??)
  R1+16 => list of (envc) fullword envv pointers, each points
                to 4 byte len in front of null-terminated
                string. Length includes the null.
  R1+20 => list of (envc) fullword envv pointers, each points
                to the envv data (not to the length fields as
                the previous set of pointers do)
  R1+24 => addr of this parm list (i.e. orig R1 value).

Maybe the double set of pointers is some normal C thing?

Andy Wood



Mon, 09 Apr 2001 03:00:00 GMT  
 initial string

Quote:

> I couldn't find this documented anywhere. This is what it APPEARS to
> be:

Would you believe it? I was just looking for something else and I
discovered that parm list described under the BPX1ATX service in the
Assembler Callable Services manual. From this I see that my "guess" was
not totally correct. The argv "data" fields do not necessarily follow
the length fields, I guess that's just the way it is currently done.

From the book:

 R1                     Parameter list

count
+-------+         |     +-------------------------|

length list
                  |     +-------------------------|

list
                  |     +-------------------------|

count
                  |     +-------------------------|

length
                  |     +-------------------------|

data list
                  |     +-------------------------|

list
                        +-------------------------+
(Self-pointer)

Andy Wood



Mon, 09 Apr 2001 03:00:00 GMT  
 initial string

Quote:


> > I couldn't find this documented anywhere. This is what it APPEARS to
> > be:

> Would you believe it? I was just looking for something else and I
> discovered that parm list described under the BPX1ATX service in the
> Assembler Callable Services manual.

That only applies if you're using OMVS (now called Unix System
Services.)

--

Shmuel (Seymour J.) Metz
Reply to host nsf (dot) gov, user smetz



Mon, 09 Apr 2001 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. initial string

2. Ada String Issue: String within Strings

3. string = string(i:j) // string(k:n)

4. Beta patch level 2 - initial reactions

5. Initial focus in dialog box

6. initial value of quad rl

7. Building initial configuration in ENVY (help with systems classes

8. Building initial configuration in EN

9. Building initial configuration in ENVY (help with systems classes needed)

10. 128 ... initial count

11. Change Initial BitMap When SmallTalk is Loading ???

12. Setting Editfield Initial State

 

 
Powered by phpBB® Forum Software