MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Read/Write file problem.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Tue Feb 01, 2005 12:14 am    Post subject: Read/Write file problem. Reply with quote

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


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Tue Feb 01, 2005 3:17 am    Post subject: Reply with quote

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


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Tue Feb 01, 2005 8:29 am    Post subject: Reply with quote

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


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Tue Feb 01, 2005 7:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group