ansnero
New User
Joined: 26 May 2006 Posts: 13
|
|
|
|
Hi
I have a Connect Direct procedure which copies a file from PNODE to SNODE and then execute a JCL on the SNODE.
Code: |
STEP1 COPY FROM(DSN=ABC.CDE.FGH -
DISP=SHR) -
TO (DSN=PQR.STU.VWX -
DISP=(NEW,CATLG,DELETE) -
UNIT=SYSDA -
DCB=(RECFM=F,LRECL=100,BLKSIZE=0)) -
COMPRESS EXT
STEP2 IF (STEP1 EQ 0) THEN
RUN JOB (DSN=SEC.TRIGGER.JCL(CA71)) SNODE
ELSE
EXIT
EIF |
Before I do the COPY I need to check if the dataset PQR.STU.VWX already exists on the SNODE catalog. Is there a way to do that from PNODE using connect direct process statements
Thanks |
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Well, as I'm sure you already know, the Connect:Direct Process language has a very limited set of instructions (i.e. COPY, RUN JOB, and RUN TASK being the major ones). RUN JOB doesn't take any parameters. RUN TASK does.
So, I'm guessing that in this case only the RUN TASK would make sense. What you'd call to be executed I don't know, since it would have to check for the existence of the dataset (presumably using LISTCAT) and then someone returning that information back to the PNODE (maybe as a return-code value). |
|