View previous topic :: View next topic |
Author |
Message |
ANDY Beginner

Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Tue Feb 01, 2005 12:14 am Post subject: Read/Write file problem. |
|
|
I have a REXX used to read/write file use command EXECIO. It is wokring fine when I submit it foreground using EXEC.
But when I submit the REXX from jcl.
//STEP010 EXEC PGM=IKJEFT01
//*
//SYSEXEC DD DSN=MYLIB.TEST.REXX,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
REXXmembername
The system always tell me :
DATA SET MYLIB.TEST.DATA ALREADY IN USE, TRY LATER+
comment: MYLIB.TEST.DATA is the lib used to hold files.
Can someone analyze what could be wrong?
Thank you. _________________ cheers,
Andy |
|
Back to top |
|
 |
ANDY Beginner

Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Tue Feb 01, 2005 3:17 am Post subject: |
|
|
Giving more clear message:
/* REXX */
....
DSNAME1 = "'"MYID008.TEST.OUTPUT"'"
DSNAME2 = "'"MYID008.TEST.DATA || "(DATA3)" || "'"
status1 = SYSDSN(DSNAME1)
say 'status1 = ' status1
status2 = SYSDSN(DSNAME2)
say 'status2 = ' status2
....
Scenario 1: submit using EXEC
status1 = OK
status2 = OK
Scenario 2: submit from jcl (as show above)
status1 = OK
status2 = UNAVAILABLE DATASET
Why submit from JCL get different result? How to solve it ?
Thank you. _________________ cheers,
Andy |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Tue Feb 01, 2005 8:29 am Post subject: |
|
|
Well, using your example JCL and REXX exec, and just replacing your dataset high-level qualifier (MYID008) with my own, it worked the same way in both environments for me:
status1 = OK
status2 = OK
Did you try to activate a trace (TRACE I) and see what it shows? |
|
Back to top |
|
 |
ANDY Beginner

Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Tue Feb 01, 2005 7:40 pm Post subject: |
|
|
Hello Superk,
Thank you for your reply.
Sorry, It is working ok on both way today. I did not change anything. I am confused. Anyway, can you tell me what 'trace' mean? How to use it? _________________ cheers,
Andy |
|
Back to top |
|
 |
|
|