View previous topic :: View next topic
|
Author |
Message |
deveshyahoo
New User
Joined: 28 Jan 2008 Posts: 10 Location: noida
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
deveshyahoo
New User
Joined: 28 Jan 2008 Posts: 10 Location: noida
|
|
|
|
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 |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Start with learning the STORAGE function of REXX.
Then, read the relevant materials regarding MVS Data Areas.
O. |
|
Back to top |
|
|
deveshyahoo
New User
Joined: 28 Jan 2008 Posts: 10 Location: noida
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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
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 |
|
|
|