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

Extracting accounting info from mainframe


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 2358
Location: Israel

PostPosted: Thu May 21, 2009 11:36 am
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
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: 2358
Location: Israel

PostPosted: Thu May 21, 2009 3:45 pm
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
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

Moderator Emeritus


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

PostPosted: Mon May 25, 2009 11:46 am
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:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2D380/CONTENTS?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon May 25, 2009 11:51 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Help in extracting data between doubl... DFSORT/ICETOOL 5
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
Search our Forums:

Back to Top