IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to get the UCB address by rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 2455
Location: Hampshire, UK

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

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 22, 2011 12:55 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 23, 2011 12:35 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Nov 23, 2011 1:42 pm
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
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 23, 2011 1:47 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 23, 2011 1:51 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 23, 2011 1:55 pm
Reply with quote

follow on ...
and it' batch facility NAVIQUEST
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 23, 2011 2:08 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Wed Nov 23, 2011 2:26 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 23, 2011 2:37 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Nov 23, 2011 4:27 pm
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 23, 2011 5:30 pm
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Nov 23, 2011 8:03 pm
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

Moderator Emeritus


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

PostPosted: Wed Nov 23, 2011 11:53 pm
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
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
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Nov 25, 2011 10:48 am
Reply with quote

Hello,

Quote:
Critical management will cause a lot of cost.
Someone is most horribly mis-informed or under-qualified. . . Or someone just wants to let the programmers do this.

I've only limited experience (been involved with administration support for a couple of hundred Mainframe, UNIX, and Win-based environments). This has not been allowed except where the programmer "sand-box" is built and disassembled repeatedly from different "model" configurations. Or when the sandbox is not visable to anything but some project team. This pretty much eliminats comprehensive testing of the applications are integrated in some way.

Several times programming groups have tried to make the case that it would cost too much to properly manage (utter nonsense, of the "rules" are just awful) and the other is the infamous - "if we cannot do this ourself - it will delay the project" (only if everyone involved is incompetent).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top