| View previous topic :: View next topic |
| Author |
Message |
anbesivam Beginner
Joined: 09 Aug 2006 Posts: 66 Topics: 14
|
Posted: Thu Aug 17, 2006 11:17 am Post subject: |
|
|
Hi superk,
Hope you are not understand the problem.
I need to pass ddname from JCL to my rexx program and I have to check DSN is exist or not in my REXX program.
As per above senario, Possitive contion is working for me. But negative condition is not worked because if I am not giving DISP for my dataset, it will be newly created.
Is there any possible way to do this ? |
|
| Back to top |
|
 |
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Thu Aug 17, 2006 11:25 am Post subject: |
|
|
anbesivam,
Please post your full JCL that you are using to execute the rexx program
________
trichomes pictures
Last edited by coolman on Sat Feb 05, 2011 1:48 am; edited 1 time in total |
|
| Back to top |
|
 |
anbesivam Beginner
Joined: 09 Aug 2006 Posts: 66 Topics: 14
|
Posted: Thu Aug 17, 2006 11:57 am Post subject: |
|
|
Please find my JCL
| Code: |
//RBDRCHK1 EXEC PGM=IKJEFT01
//ISPPROF DD DSN=&&PROF,UNIT=SYSDA,SPACE=(TRK,(5,5,5)),
// RECFM=FB,LRECL=80
//ISPSLIB DD DISP=SHR,DSN=PL.NPL.PROD.SLIB
// DD DISP=SHR,DSN=ISP.SISPSENU
//ISPPLIB DD DISP=SHR,DSN=PL.NPL.PROD.PLIB
// DD DISP=SHR,DSN=ISP.SISPPENU
//ISPMLIB DD DISP=SHR,DSN=PL.NPL.PROD.MLIB
// DD DISP=SHR,DSN=ISP.SISPMENU
//ISPTLIB DD DISP=SHR,DSN=ISP.SISPTENU
//DD1 DD DSN=XXXXXXX.TEST.JCL,DISP=SHR --> Existing
//*DD1 DD DSN=XXXXXXX.TEST.JCL123 --> Non Existing
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSEXEC DD DSN=XXXXXXX.TEST.REXX.EXEC,DISP=SHR
//SYSTSIN DD *
ISPSTART CMD(%REXXTEST DD1)
/*
|
And following is my REXX code
| Code: |
/* REXX*/
ARG PDSNAME
CALL LISTDSI(PDSNAME FILE)
DNAME = SYSDSNAME
RC = SYSDSN(" ' "DNAME" ' ")
SAY 'RC ' RC
|
|
|
| Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Aug 17, 2006 12:22 pm Post subject: |
|
|
| Why do you have spaces around the single quotes? Also, since this is not an ISPF program, you don't need the ISPF data sets or the ISPSTART CMD() invocation. In any event, the job will fail if the data set specified by a dd statement with disp=old or mod does not exist. Your program will never be executed. |
|
| Back to top |
|
 |
anbesivam Beginner
Joined: 09 Aug 2006 Posts: 66 Topics: 14
|
Posted: Thu Aug 17, 2006 1:13 pm Post subject: |
|
|
Yes, I feel the same.
If Possible, Could you please provide JCL for running REXX program other than above one.
Thanks in advance. |
|
| Back to top |
|
 |
anbesivam Beginner
Joined: 09 Aug 2006 Posts: 66 Topics: 14
|
Posted: Fri Aug 18, 2006 4:47 am Post subject: |
|
|
Thanks so much to each and every one for spending your time for me.
All the inputs given by you are valuable for me.
I have found the REXX run jcl. |
|
| Back to top |
|
 |
Steve Coalbran Beginner
Joined: 09 Mar 2005 Posts: 22 Topics: 0 Location: Stockholm, Sweden
|
Posted: Mon Aug 21, 2006 1:34 pm Post subject: |
|
|
Here's a technique I use to define a generic dsname from JCL...
| Code: |
// SET MD='(MOD,DELETE),SPACE=(TRK,0)'
...
//SOMEPROC PROC PRJ1=,LIB1=
...
//S030 EXEC PGM=IKJEFT1A,PARM=REXXBIT
//SYSMASK DD DISP=&MD,DSN=&PRJ1..&LVL1..M-A-S-K
...
|
in the REXX executed by this step...
| Code: |
RC = LISTDSI("SYSMASK FILE")
IF( RC<>0 )THEN EXIT 16
pm = POS("M-A-S-K",sysdsname)
pfx = LEFT(sysdsname,pm-1)
ids = "'"pfx".INPUT'"
ods = "'"pfx".OUTUT'"
dc = LISTDSI(ids "RECALL SMSINFO")
dc = LISTDSI(ods "RECALL SMSINFO")
IF( SYSDSN(ids)<>"OK" ,
SYSDSN(ods)="OK" )THEN EXIT 8
"ALLOC DD(IDS) DS("ids") SHR REUSE"
attr = "LRECL(80) RECFM(F B) BLKSIZE(3120) SPACE(30)TRACKS"
"ALLOC DD(ODS) DS("ods") NEW REUSE" attr
....
|
...get the picture?...
As the catalogued JCL procedure and exec are promoted from development->systest->acctest->prod (if it's a nicely library managed shop with buckets of QA and change control tickets... luvly-jubbly... then the PRJ1 and LVL1 will change (or the LVL1 anyhow) thus allowing you generic definition of the datasets.
/Steve  |
|
| Back to top |
|
 |
|
|
|