Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

error while writing a file in rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
nitika malhotra

New User


Joined: 07 Apr 2015
Posts: 3
Location: India

PostPosted: Fri Apr 10, 2015 12:10 pm    Post subject: error while writing a file in rexx
Reply with quote

Hi,

I am coding a tool in which we can add edit or delete from a file but when i read the file and try to write one record at the end of file, m getting an error.
My code is:
Code:
"ALLOC SHR REU FILE(HI) DATASET('S2.REXX.FILE.BKUP')"
'EXECIO * DISKR HI1 (STEM LINES. FINIS'
NUM = LINES.0 + 1
FREE FILE(HI)"               

LINES.NUM = OVERLAY('ABC',LINES.NUM)

"ALLOC SHR REU FILE(HI1) DATASET('S2.REXX.FILE.BKUP')"
'EXECIO * DISKW HI1 (STEM LINES. FINIS'
FREE FILE(HI1)"               


Error:

Code:
ICH408I USER(userid) GROUP(S2) NAME(,)
  GFST.REXX.LOGFILE CL(DATASET ) VOL(MI3D14)
  INSUFFICIENT ACCESS AUTHORITY
  FROM GFST.* (G)
  ACCESS INTENT(UPDATE ) ACCESS ALLOWED(READ )
IEC150I 913-38,IFG0194E,userid,$BSDUSER,LOGFIL,A1B0,MI3D14,GFST.REXX.LOGFILE
System abend code 913, reason code 00000056.
Abend in host command EXECIO or address environment routine TSO.
EXECIO error while trying to GET or PUT a record.       

But when i try to write in the file (just the above code and no other functionality like panel display etc.) in a separate member of pds, it works. I can even edit the file by tso/ispf. Could you please advise what can be the issue here. What is the file GFST.REXX.LOGFILE
Back to top
View user's profile Send private message

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1475
Location: Chennai

PostPosted: Fri Apr 10, 2015 6:48 pm    Post subject:
Reply with quote

Hello,

ICH* messages are RACF messages and it clearly says that you don't have edit/update access to the dataset.
Code:
ACCESS INTENT(UPDATE ) ACCESS ALLOWED(READ )


It says that the ID is intending to UPDATE/EDIT the dataset, but the ID has only READ access.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 343
Location: USA

PostPosted: Fri Apr 10, 2015 7:15 pm    Post subject: Reply to: error while writing a file in rexx
Reply with quote

I think the question is about the GFST.REXX.LOGFILE

The ID doesn't have access to write to 'this' rexx logfile but Nitika doesn't know why there is a write to this file.

As far as I understand it, Nitika is able to write in the file 'S2.REXX.FILE.BKUP' using ISPF 3.4
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2033
Location: Silicon Valley

PostPosted: Fri Apr 10, 2015 8:53 pm    Post subject: Reply to: error while writing a file in rexx
Reply with quote

I suspect you are not showing the entire rexx program and the problem is in another section of the program.

Add a TRACE('R') to the beginning of the program.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 343
Location: USA

PostPosted: Fri Apr 10, 2015 9:05 pm    Post subject: Reply to: error while writing a file in rexx
Reply with quote

I believe the problem is Not with this part of the rexx code (apart from having " before FREE and using HI instead of HI1 at line 2)

This seems to be a part of the process and the error may be coming from a different part of code. You may need to check what is the high level qualifier GFST with your colleagues.

Please analyze/let us know the whole process to see where it is going to write that log file.

*Pedro submitted the post before I did icon_smile.gif But we are trying to say the same thing.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1756
Location: UK

PostPosted: Fri Apr 10, 2015 11:06 pm    Post subject:
Reply with quote

Now that I have coded it I can read your code better. Please code it yourself in future.

I see that with the first ALLOC you allocate to FILE(HI) but your DISKR references HI1.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us