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

Is there a way to add a wait step in the Connect:Direct PROC


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ram5er

New User


Joined: 14 Jul 2006
Posts: 14
Location: Dallas, Texas

PostPosted: Fri Feb 09, 2007 6:02 am
Reply with quote

Need to add a wait step of 4 min to the CONNECT:Direct process card. Does anyone know how to do this?

ZYPxxxV1 PROCESS SNODEID=(PROD)
STEP01 COPY FROM(PNODE DSN=&FROMDSN -
DISP=(OLD,KEEP,KEEP)) -

TO(SNODE DSN=&TODSN -
SYSOPTS=":STRIP.BLANKS=NO:DATATYPE=BINARY:" -
DISP=(NEW,CATLG,DELETE)) -
COMPRESS EXT
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Feb 13, 2007 8:11 pm
Reply with quote

A RUN TASK would keep the process executing in an Asynchronous manner. You didn't offer any details as to what language you would code the wait routine in.

I ran this test using a REXX exec that takes advantage of the REXX elapsed time event:

Code:

MYPROC   PROCESS PNODE=PNODE NOTIFY=%USER                       -
                 SNODE=SNODE                                    -
                 &USER=%USER                                    -
                 &SEQ=%NUM1                                     
*                                                               
                 SYMBOL &SEQ1=\T\ || &SEQ                       
                 SYMBOL &ADSN=\&USER\ || \.PROCESS.\ || &SEQ1   
                 SYMBOL &BDSN=\&USER\ || \.SYSTSPRT.\ || &SEQ1   
                 SYMBOL &CDSN=\&USER\ || \.SYSTSIN.\ || &SEQ1   
*                                                               
STEP1    COPY    FROM (PNODE DSN=HLQ1.HLQ2.PROCESS              -
                       DISP=(SHR,DELETE,KEEP))                  -
                 TO   (SNODE DSN="&ADSN"                        -
                       DISP=(NEW,CATLG,CATLG))                  -
                 COMPRESS EXTENDED                               
*                                                               
STEP2A   RUN TASK (PGM=DMRTDYN                                  -
                   PARM=(C'ALLOC',                              -
                         C' DD=SYSEXEC'                         -
                         C' DSN=HLQ1.HLQ2.REXX'                 -
                         C' DISP=(SHR,KEEP)')) PNODE             
*                                                                 
STEP2B   RUN TASK (PGM=DMRTDYN                                  -
                   PARM=(C'ALLOC',                              -
                         C' DD=SYSTSPRT'                        -
                         C" DSN=&BDSN"                          -
                         C' DISP=(NEW,CATLG)',                  -
                         C' SPACE=(TRK,(1,1))',                 -
                         C' DCB=(RECFM=FB,LRECL=133,BLKSIZE=0)', -
                         C'UNIT=SYSDA')) PNODE                   
*                                                                 
STEP2C   RUN TASK (PGM=DMRTDYN                                  -
                   PARM=(C'ALLOC',                              -
                         C' DD=SYSTSIN'                         -
                         C" DSN=&CDSN"                          -
                         C' DISP=(NEW,CATLG)',                  -
                         C' SPACE=(TRK,(1,1))',                 -
                         C' DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)', -
                         C'UNIT=SYSDA')) PNODE                   
*                                                               
STEP2D   RUN TASK (PGM=IRXJCL,PARM=(C'WAIT 240')) PNODE         
*                                                               
STEP3A   RUN TASK (PGM=DMRTDYN                                  -
                   PARM=(C'UNALLOC',                            -
                         C' DD=SYSEXEC')) PNODE                 
*                                                               
STEP3B   RUN TASK (PGM=DMRTDYN                                  -
                   PARM=(C'UNALLOC',                            -
                         C' DD=SYSTSIN')) PNODE                 
*                                                               
STEP3C   RUN TASK (PGM=DMRTDYN                                  -
                   PARM=(C'UNALLOC',                            -
                         C' DD=SYSTSPRT')) PNODE                 
*                                                               


The WAIT exec:

Code:

/* REXX WAIT */                                       
Parse Arg secs .                                     
If Datatype(secs) <> 'NUM' Then secs = 60             
secs = Abs(secs)                                     
secs = Trunc(secs,0)                                 
Say Time()' Starting Wait For 'secs' Seconds ...'     
rc = Time(R)                                         
Do Forever                                           
  n = Time(E)                                         
  If n >= secs Then Leave                             
End                                                   
Say Time()' Ending Wait'                             
Exit 0                                               


I had previously successfully tested this COBOL program for a wait:

Code:

CBL DATA(24)                                                           
       IDENTIFICATION DIVISION.                                         
       PROGRAM-ID. WAIT.                                               
                                                                       
       WORKING-STORAGE SECTION.                                         
       01  DELAY-AMT               PIC S9(9) COMP.                     
       01  CURRENT-TIME            PIC 9(8).                           
                                                                       
       LINKAGE SECTION.                                                 
       01  PARM.                                                       
           03  PARM-LENGTH         PIC S9(04) COMP SYNC.               
           03  PARM-DELAY-AMT      PIC 9(3).                           
                                                                       
       PROCEDURE DIVISION USING PARM.                                   
           MOVE PARM-DELAY-AMT TO DELAY-AMT.                           
           ACCEPT CURRENT-TIME FROM TIME.                               
           DISPLAY CURRENT-TIME.                                       
           CALL 'ILBOWAT0' USING DELAY-AMT.                             
           ACCEPT CURRENT-TIME FROM TIME.                               
           DISPLAY CURRENT-TIME.             
           MOVE ZEROS TO RETURN-CODE.       
           STOP RUN.                         
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Connect Direct 6.3 for Z/OS All Other Mainframe Topics 20
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Wait for job rc CLIST & REXX 10
Search our Forums:

Back to Top