Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Extracting accounting info from mainframe

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
deveshyahoo

New User


Joined: 28 Jan 2008
Posts: 10
Location: noida

PostPosted: Thu May 21, 2009 10:59 am    Post subject: Extracting accounting info from mainframe
Reply with quote

Hi All,

I am developing a new application that has a front end in dot net and book end uses rexx to do processing along with jcls.
to initiate the backend process from front end i am FTPing a jcl directly to internal reader that calls REXX module.
All this is working fine. But the hitch is:

The job that i FTP to initiate the complete backend process needs user's Accounting information. Although i am accepting the user's login id and password but wanted to know if there is any mode through which i can get the accounting information from mainframe on the basis of user id.
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu May 21, 2009 11:36 am    Post subject:
Reply with quote

Try this:
Code:
/*------------------------------- REXX -------------------------------
 * PROGRAM   : GETPROGN
 * FUNCTION  : GET PROGRAMMER NAME
 * AUTHOR    : OFER
 * DATE      : 04/02/04
 * HOW TO USE:
 *           :
 *------------------------------------------------------------------*/

  NUMERIC DIGITS(32)
       TCB=STORAGE(D2X(540),4)
      JSCB=STORAGE(D2X(C2D(TCB)+180),4)
   SYSJESN=STORAGE(D2X(C2D(STORAGE(D2X(C2D(JSCB)+316),4))+12),8)
       JCT=STORAGE(D2X(C2D(JSCB)+260),4)
   SYSJOBN=STORAGE(D2X(C2D(JCT)+24),8)
       ACT=STORAGE(D2X(C2D(JCT)+56),3)
   SYSPGMR=STORAGE(D2X(C2D(ACT)+24),20)
      ACTL=C2D(STORAGE(D2X(C2D(ACT)+48),1))
   SYSACCT=STORAGE(D2X(C2D(ACT)+49),ACTL)
  IF SYSVAR(SYSISPF)=ACTIVE
  THEN  ADDRESS ISPEXEC 'VPUT (SYSJESN SYSJOBN SYSPGMR SYSACCT) PROFILE'
  ELSE  SAY WORD(SYSJOBN,1)'('SYSJESN') ACCOUNT('SYSACCT')' SYSPGMR

EXIT


O.
Back to top
View user's profile Send private message
deveshyahoo

New User


Joined: 28 Jan 2008
Posts: 10
Location: noida

PostPosted: Thu May 21, 2009 2:53 pm    Post subject:
Reply with quote

Thanks for a speedy reply. Can you please exlpain what are we doing in each line. i know what is D2X but a high level information of every line will be great.
I will atleast know what is happening due to what icon_biggrin.gif
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu May 21, 2009 3:45 pm    Post subject:
Reply with quote

Start with learning the STORAGE function of REXX.
Then, read the relevant materials regarding MVS Data Areas.

O.
Back to top
View user's profile Send private message
deveshyahoo

New User


Joined: 28 Jan 2008
Posts: 10
Location: noida

PostPosted: Mon May 25, 2009 11:34 am    Post subject:
Reply with quote

Thanks a lot for the your code. it works perfectly fine.

I went through the description of "storage()" function and now have some understanding about it.
Code:
TCB=STORAGE(D2X(540),4)

What i am not able to understand is why do we start referencing to the memory from 540 = x'21c' to get the data related to accounting info. And where does this memory refer to?

Please provide some info on this.
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: Mon May 25, 2009 11:46 am    Post subject:
Reply with quote

Hello,

In order to understand the activity in that code, one needs to become familiar with the system data areas or control blocks.

Most of the internal information in the operating system is a series of linked data lists.

You might begin learning here:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2D380/CONTENTS?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10375
Location: italy

PostPosted: Mon May 25, 2009 11:51 am    Post subject: Reply to: Extracting accounting info from mainframe
Reply with quote

Quote:
What i am not able to understand is why do we start referencing to the memory from 540 = x'21c' to get the data related to accounting info.


because the manuals say it icon_cool.gif

You are not getting the accounting info from there,
You start chasing a chain of control blocks, which at the end take You to the control block containing the accounting info

Quote:
And where does this memory refer to?

it refer to absolute address 540 which is part of the PSA ( prefixed storage area )
and it points to the current TCB address

look at the ibm docs for the desription of the storage areas related to control blocks
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
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Mainframe Blocks to Tracks conversion upendrasri JCL & VSAM 1 Sat Nov 18, 2017 10:52 am
No new posts NDM 300 files from mainframe to linux shreya19 All Other Mainframe Topics 2 Thu Oct 26, 2017 11:40 am
No new posts Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm
No new posts Mainframe scheduling tool ddhar Compuware & Other Tools 2 Wed Sep 27, 2017 12:48 am
No new posts How do I create a mainframe monitorin... anjali.bisht All Other Mainframe Topics 4 Fri Sep 01, 2017 2:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us