|
View previous topic :: View next topic
|
| Author |
Message |
kpoxa
New User

Joined: 22 Jun 2006 Posts: 2
|
|
|
|
I have the next STL
| Code: |
constant handle_sa# '240'
constant data_sa# '241'
constant rc_counter# 'DC101'
constant rc_eof 2
allocate file_handle handle_sa#
allocate file_data data_sa#
allocate file_rc rc_counter#
TEST : msgtxt
say 'Hello from the TPNS simulation'
say 'The constants are:' handle_sa# data_sa# rc_counter#
file_data = 'HLQ.TPNS.DATA'
file_rc = 999
userexit('ITPFIOX', 'OPENI' rc_counter# handle_sa# data_sa#)
if file_rc <> 0 then say 'file error =' char(file_rc)
else say 'File' file_data 'opened. rc='char(file_rc)
do forever
userexit('ITPFIOX', 'READ' rc_counter# handle_sa# data_sa#)
if file_rc <> 0 then do
say 'file error =' char(file_rc)
leave
end
else
say 'Read from file:' substr(file_data,1,40)
end
if file_rc <> rc_eof then say 'Invalid operation' char(file_rc)
else say 'EOF reached, rc='char(file_rc)
userexit('ITPFIOX', 'CLOSE' rc_counter# handle_sa# )
if file_rc <> 0 then say 'file error =' char(file_rc)
else say 'File closed, rc='char(file_rc)
opcmnd ('ZEND')
say 'ZEND sended'
opcmnd ('P')
endtxt
|
end I run this simulation (after translation to MSG DECK) with next JCL
| Code: |
//MYIDTPNS JOB (5610),'TPNS',MSGCLASS=R,
// CLASS=Y,NOTIFY=&SYSUID,REGION=0M,PRTY=10
//*
// V NET,ID=MYTPNS,ACT
//*
// SET TPNSBASE='TPNS.LOAD'
// SET HLQ='MYUID.TPNS'
// SET MONID=MYMON
// SET NETID=MYTEST
// SET LOG='DSN=MYUID.TPNS.LOG(MYLOG),DISP=SHR'
// SET SYSP='DSN=MYUID.TPNS.LOG(PRINT),DISP=SHR'
//*SET LOG='SYSOUT=*'
//*
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//* T P N S S D S F S C R I P T -
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//*
//ISPF EXEC PGM=ITPENTER,TIME=1440,PERFORM=20,DPRTY=(15,15),
// PARM='DMAPPL=&MONID,NTWRKL=&NETID'
//STEPLIB DD DSN=&TPNSBASE,DISP=SHR
//SYSPRINT DD &SYSP
//SYSABEND DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSUT2 DD SPACE=(CYL,(1,1,10)),UNIT=SYSDA
//SYSUT3 DD SPACE=(CYL,(1,1,10)),UNIT=SYSDA
//MSGDISK DD UNIT=SYSDA,SPACE=(4096,100)
//INITDD DD DSN=&HLQ..INIT,DISP=SHR
//MSGDD DD DSN=&HLQ..MSG,DISP=SHR
//LOGDD DD &LOG
|
The problems
1. The simulation performs all operations, file opens, reed operations finishes with code 0 and finally file is closed. But TPNS not finishes its work, JCL stacks on the step ISPF (see in JCL).
2. without using of opcmnd ('ZEND') MSG deck not finishes the simulation and without opcmnd ('P') TPNS takes an all output produced by the simulation and repeats it infinite times (this fills the SYS log and I receive compliment from the operators). I don't know if actually TPNS sends the same output or it rerun the same DECK again and again
(until I cancel job in SDSF).
The question: where is the problem , in my STL or some were else and how I can track this issue. |
|
| Back to top |
|
 |
kpoxa
New User

Joined: 22 Jun 2006 Posts: 2
|
|
|
|
| By the way, I'm not wrote this, but, if I remove from this STL all calls to userexit, the simulation finishes successful and TPNS also finishes without repeating of output and immediately. I think the problem is some how related to such userexit's. |
|
| Back to top |
|
 |
Bruce Johnson
New User
Joined: 02 Jan 2012 Posts: 1 Location: New Zealand
|
|
|
|
I am guessing you have a NTWRK definition with PATH statements that
define TEST as the only msgtxt. If so then tpns will continue to attempt to
re-execute this deck. You must build in some scripting logic to stop execution.
In this case you have found that Zend and P will stop execution.
ZEND command causes an orderly shutdown of the tpns system and writes the message log buffers to the log data set and causes the job to end.
P command causes tpns to stop activity on the resource specified, in this case it will default to stopping the NTWRK, but because you have already ended tpns with Zend the P is not needed.
You may care to investigate the Quiesce command in STL. Also the Release command.
If you still need help let me know. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
|
|
The topic has been resurrected after
| Code: |
... 5 year(s) - (months difference / 12 )
... 6 year(s) - (difference )
... 70 months
... 2118 days
... 50849 hours
... 3050965 minutes
... 183057900 seconds |
it would be odd that a reply ( even if a correct one ) would still be useful after such a long time
since these are the only posts from the TS ( topic starter ) it is reasonable to infer that heshe just diappeared. |
|
| Back to top |
|
 |
prino
Senior Member

Joined: 07 Feb 2009 Posts: 1325 Location: Vilnius, Lithuania
|
|
|
|
| Opening long forgotten topics is very easy to prevent, just lock anything older than three months, like I do on FanDeZhi. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|