Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to get the UCB address by rexx
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Tue Nov 22, 2011 8:50 am    Post subject: How to get the UCB address by rexx
Reply with quote

excuted rexx UCBSEL from cbttape file020,can't get any UCB and UCBNX address.

/*rexx*/
CVT = STORAGE(10,4) /* LOAD A(CVT) */
DCVT = C2D(CVT) /* CONVERT TO DECIMAL */

UCB = STORAGE(D2X(DCVT+X2D(4E4)),4) /* LOAD A(CVTUCBA) */
DUCB = C2D(UCB) /* CONVERT TO DECIMAL */

I got result:ducb=0

DO I = 1 BY 1 UNTIL DUCB = 0
UCBN = STORAGE(D2X(DUCB+X2D(04)),2) /* LOAD UCBNUM ADDR */
UCBNX = STORAGE(D2X(DUCB+X2D(08)),4) /* LOAD A(UCBNEXT) */
UCBSTAT= STORAGE(D2X(DUCB+X2D(03)),1) /* LOAD UCB STATUS */
UCBTYP = STORAGE(D2X(DUCB+X2D(11)),1) /* LOAD UCBTBYT2 TYPE */
UCBDEV = STORAGE(D2X(DUCB+X2D(12)),1) /* LOAD UCBTBYT3 TYPE */
UCBTYP = STORAGE(D2X(DUCB+X2D(13)),1) /* LOAD UCBTBYT4 TYPE */
UCBMOD = STORAGE(D2X(DUCB+X2D(3E)),1) /* LOAD UCBMOD MODEL */
UCBSTAB= STORAGE(D2X(DUCB+X2D(22)),1) /* LOAD UCB ATTRIBUTE */

........................
the result: C2D(UCBNX)=0

can someone give some advice?thanks!

the environment is z/os v1.11. The UCB offset is correct comparing with data area books.
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Tue Nov 22, 2011 10:51 am    Post subject:
Reply with quote

What does running with a trace show?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Nov 22, 2011 12:55 pm    Post subject: Reply to: How to get the UCB address by rexx
Reply with quote

the approach You are using stopped working at least since the appearance of OS/390,
but IIRC even before, since the appearance of MVS/XA (or it was MVS/SP)
the uscbscan is done nowadays using the
Code:
 139000 CVTUCBSC DC    V(IOSVSUCB) - ADDRESS OF UCB SCAN               @G860P46
 139100 *                            SERVICE.               @(DCR377)  @G860P46


depending on the real need there are a few alternatives, but without You telling us little can be done to help You
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Wed Nov 23, 2011 10:51 am    Post subject:
Reply with quote

hello,enrico

does it mean we can't get ucb info by rexx any more? ASM is necessary...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Nov 23, 2011 12:35 pm    Post subject: Reply to: How to get the UCB address by rexx
Reply with quote

repeat on icon_cool.gif
Quote:
depending on the real need there are a few alternatives, but without You telling us little can be done to help You


anyway.. YES, assembler is needed
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Nov 23, 2011 1:42 pm    Post subject:
Reply with quote

I'm intrigued as to why the need to know the UCB address
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Wed Nov 23, 2011 1:44 pm    Post subject:
Reply with quote

need to get the online volume information,so ....
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Nov 23, 2011 1:47 pm    Post subject: Reply to: How to get the UCB address by rexx
Reply with quote

the most common reason I found is to issue an LSPACE macro
to find out the residual space on a volume and do some in house implementation of some SMS logic
( delete and allocate mostly )
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Nov 23, 2011 1:51 pm    Post subject: Reply to: How to get the UCB address by rexx
Reply with quote

Quote:
need to get the online volume information,so ....

ever heard of ismf ...

Code:
   Panel  Help                                                                 
 ——————————————————————————————————————————————————————————————————————————————
                  ISMF PRIMARY OPTION MENU - z/OS DFSMS Vz Rzz                 
 Selection or Command ===>                                                     
                                                                               
 0  ISMF Profile              - Specify ISMF User Profile                       
 1  Data Set                  - Perform Functions Against Data Sets             
 2  Volume                    - Perform Functions Against Volumes               
 3  Management Class          - Specify Data Set Backup and Migration Criteria 
 4  Data Class                - Specify Data Set Allocation Parameters         
 5  Storage Class             - Specify Data Set Performance and Availability   
 6  Storage Group             - Specify Volume Names and Free Space Thresholds 
 7  Automatic Class Selection - Specify ACS Routines and Test Criteria         
 8  Control Data Set          - Specify System Names and Default Criteria       
 9  Aggregate Group           - Specify Data Set Recovery Parameters           
 10 Library Management        - Specify Library and Drive Configurations       
 11 Enhanced ACS Management   - Perform Enhanced Test/Configuration Management 
 C  Data Collection           - Process Data Collection Function               
 G  Report Generation         - Create Storage Management Reports               
 L  List                      - Perform Functions Against Saved ISMF Lists     
 P  Copy Pool                 - Specify Pool Storage Groups for Copies         
 R  Removable Media Manager   - Perform Functions Against Removable Media       
 X  Exit                      - Terminate ISMF                                 
 Use HELP Command for Help; Use END Command or X to Exit.



Code:
   Panel  Help                                                                 
 ——————————————————————————————————————————————————————————————————————————————
                           VOLUME LIST SELECTION MENU                           
 Enter Selection or Command ===>                                               
                                                                               
 1  DASD                      - Generate a List of DASD Volumes                 
 2  Mountable Optical         - Generate a List of Mountable Optical Volumes   
 3  Mountable Tape            - Generate a List of Mountable Tape Volumes       
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
 Use HELP Command for Help; Use END Command to Exit. 




Code:
   Panel  Defaults  Utilities  Scroll  Help                                     
 ——————————————————————————————————————————————————————————————————————————————
                          VOLUME SELECTION ENTRY PANEL              Page 1 of 3
 Command ===>                                                                   
                                                                               
 Select Source to Generate Volume List  . .    (1 - Saved list, 2 - New list)   
   1  Generate from a Saved List         Query Name To                         
        List Name  . .                   Save or Retrieve                       
   2  Generate a New List from Criteria Below                                   
        Specify Source of the New List  . .    (1 - Physical, 2 - SMS)         
        Optionally Specify One or More:                                         
        Enter "/" to select option      Generate Exclusive list                 
          Type of Volume List . . .            (1-Online,2-Not Online,3-Either)
          Volume Serial Number  . .            (fully or partially specified)   
          Device Type . . . . . . .            (fully or partially specified)   
          Device Number . . . . . .            (fully specified)               
            To Device Number  . . .            (for range of devices)           
          Acquire Physical Data . .            (Y or N)                         
          Acquire Space Data  . . .            (Y or N)                         
          Storage Group Name  . . .            (fully or partially specified)   
          CDS Name . . . . . . .                                               
                                               (fully specified or 'Active')   
 Use ENTER to Perform Selection; Use DOWN Command to View next Selection Panel;
 Use HELP Command for Help; Use END Command to Exit.                           
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Nov 23, 2011 1:55 pm    Post subject: Reply to: How to get the UCB address by rexx
Reply with quote

follow on ...
and it' batch facility NAVIQUEST
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt2s272/1.21?ACTION=MATCHES&REQUEST=naviquest&TYPE=FUZZY&SHELF=DGT2BK81.bks&DT=20090227163444&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT


up to You to read about it in the DFSMS manuals relative to Yor zOS level
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Wed Nov 23, 2011 2:01 pm    Post subject:
Reply with quote

I am developing some tools to compare the system parms before and after IPLs. These tools have to check dasd,apf,lnklst,SSI,IPL,ect. So automatic programs and jobs are necessary.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Nov 23, 2011 2:08 pm    Post subject: Reply to: How to get the UCB address by rexx
Reply with quote

why reinvent the wheel
what is wrong in using the ibm health checker
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Wed Nov 23, 2011 2:18 pm    Post subject:
Reply with quote

The focus is "comparing".for developing environment,programmers always update system parms without notifying.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Nov 23, 2011 2:26 pm    Post subject:
Reply with quote

Victor Niu wrote:
The focus is "comparing".for developing environment,programmers always update system parms without notifying.


Oh dear, this sounds like an extremely well run shop.

Anyway DCOLLECT will have everything you will ever need to know about DASD volumes and their associated UCB
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Nov 23, 2011 2:37 pm    Post subject:
Reply with quote

expat wrote:
Victor Niu wrote:
The focus is "comparing".for developing environment,programmers always update system parms without notifying.


Oh dear, this sounds like an extremely well run shop.

Anyway DCOLLECT will have everything you will ever need to know about DASD volumes and their associated UCB


Hi expat ! just choose
1) You did not notice the sentence I bolded in the quote
2) You forgot the sarcasm icon ( unfortunately there isn' t one )
icon_wink.gif

I dare to say that if the programmers are allowed to update system parms
the shop is running very well... but down the toilet
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Nov 23, 2011 4:27 pm    Post subject:
Reply with quote

icon_lol.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Wed Nov 23, 2011 5:30 pm    Post subject:
Reply with quote

Quote:
The focus is "comparing".for developing environment,programmers always update system parms without notifying.
Oooohhhh ... I wanna work there! I could have FUN! I wonder how often the LPAR gets an IPL?
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Nov 23, 2011 8:03 pm    Post subject:
Reply with quote

Quote:
Oooohhhh ... I wanna work there! I could have FUN!


Oooohhhh NO! Surely the fun would be in having wagers on what (sub)-system you will log onto. ... logged on with APPLID(xxxxxxx) to IMS yesterday and this morning, but getting CICS (or something else) this afternoon?

Maybe regular upward revision of project estimates is a feature of this site?

Garry.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Nov 23, 2011 11:53 pm    Post subject: Reply to: How to get the UCB address by rexx
Reply with quote

Hello,

I don't recall ever hearing of a place that turned developers loose so that programmers always update system parms without notifying.

Maybe i misunderstand what "system parameters" means for this organization.

Regardless of the specifics, i have no idea how they survive letting multiple (probably unqualified) people just have at it. . . icon_rolleyes.gif

d
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Fri Nov 25, 2011 8:07 am    Post subject:
Reply with quote

May you should say so bad system management,but for the development environment,it is the historical issue.Critical management will cause a lot of cost.

enrico and expat,thank you very much for your help.have a nice day!

: )
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us