(Q) How do I do this with a translate table 
Author Message
 (Q) How do I do this with a translate table

What's the best way to extract the third qualifier of a dataset name?

eg DSN=AAA.BBB.NAME.CCC.DDD
                   """""
then i want to extract NAME where the dataset name could be a variable
number of qualifiers and each qualifier could be of variable length.

Thanks in advance for any help

Llewellyn Daniels
Mercedes Benz of SA



Mon, 19 Jan 1998 03:00:00 GMT  
 (Q) How do I do this with a translate table

Quote:
s) writes:

:>
:>What's the best way to extract the third qualifier of a dataset name?
:>
:>eg DSN=AAA.BBB.NAME.CCC.DDD
:>                   """""
:>then i want to extract NAME where the dataset name could be a variable
:>number of qualifiers and each qualifier could be of variable length.
:>
:>Thanks in advance for any help
:>
:>Llewellyn Daniels
:>Mercedes Benz of SA
:>              
:>

If you're certain there are at least three qualifiers, the following should
do the trick:

* R4 contains length of data set name
* DSNAME contains data set name
        TRT   DSNAME,FINDDOT    Find the first qualifier delimiter
        TRT   1(L'DSNAME,R1),FINDDOT    Find the second qualifier delimiter
        LA    R3,1(,R1)         Point to the third qualifier
        LA    R1,DSNAME(R4)     Point to end of data set name
        LR    R2,R1             Compute remaining length
        SR    R2,R3
        BCTR  R2,0
        EX    R2,FINDEND        Find end of third qualifier
        SR    R1,R3             Compute third qualifier length
* R3 contains third qualifier address
* R1 contains third qualifier length
..
FINDEND TRT   0(*-*,R3),FINDDOT
..
FINDDOT DC    256X'00'          TRT table to locate data set name delimiter
        ORG   FINDDOT+C'.'
        DC    C'.'
        ORG   ,
..

Romney White
ParaSoft, Inc.



Mon, 19 Jan 1998 03:00:00 GMT  
 (Q) How do I do this with a translate table
: >What's the best way to extract the third qualifier of a dataset name?

: >eg DSN=AAA.BBB.NAME.CCC.DDD
: >                   """""
: >then i want to extract NAME where the dataset name could be a variable
: >number of qualifiers and each qualifier could be of variable length.

Daniels, in which environment do you want to do this?
Are you in REXX, or in assembler... or you must obtain it start from zero?!
For example, if you are in JCL, in which way can you pass the DSN information
to program? By a DDNAME or via PARM?
Try to be more accurate in your effective need, and I will try to help you.
Bye.

                                  Claudio Mauceri



Thu, 22 Jan 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Doing assembly and really doing assembly

2. Doing assembly and really doing assembly

3. What can be done in FORTRAN that cannot be done in C/C++?

4. How can view styles be done?

5. - Fall 2003 Release done

6. How to minimize damage done by Java

7. How is Strand doing ?

8. Anyone doing anything with NNTP in Dolphin?

9. WHAT ARE THE KIDS REALLY DOING ONLINE..

10. WHAT ARE EMPLOYEES REALLY DOING ONLINE^^^

11. How's Your online business doing?

12. Done my first window...

 

 
Powered by phpBB® Forum Software