Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Heed help with TPNS using STL and using user exits

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
kpoxa

New User


Joined: 22 Jun 2006
Posts: 2

PostPosted: Thu Jun 22, 2006 4:48 pm    Post subject: Heed help with TPNS using STL and using user exits
Reply with quote

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
View user's profile Send private message

kpoxa

New User


Joined: 22 Jun 2006
Posts: 2

PostPosted: Thu Jun 22, 2006 5:21 pm    Post subject: Re: Heed help with TPNS using STL and using user exits
Reply with quote

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
View user's profile Send private message
Bruce Johnson

New User


Joined: 02 Jan 2012
Posts: 1
Location: New Zealand

PostPosted: Tue Apr 10, 2012 10:46 am    Post subject: Heed help with TPNS using STL and using user exits
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue Apr 10, 2012 11:02 am    Post subject: Reply to: Heed help with TPNS using STL and using user exits
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1027
Location: Oostende, Belgium

PostPosted: Tue Apr 10, 2012 4:04 pm    Post subject:
Reply with quote

Opening long forgotten topics is very easy to prevent, just lock anything older than three months, like I do on FanDeZhi.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts User Cancels the job PANDU1 DB2 1 Sat Mar 04, 2017 8:21 pm
No new posts SORT - E15 and E35 using same user ex... Abhi Nature DFSORT/ICETOOL 12 Mon Oct 03, 2016 4:33 pm
No new posts User exit in COBOL programs ganasrinivasan PL/I & Assembler 0 Thu Aug 18, 2016 12:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us