MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » April 2013

Re: Data not getting written to /tmp



fixed

** I changed the Callp to Call 'QCMDEXC'
And I am getting more info in the joblog now.

I don't know why the system is creating this file in QTEMP

File QACP173785 created in library QTEMP.

And then I get this error:
40 04/05/13 19:11:17 QC2IO QSYS *STMT QCPEXPRT QSYS
From module . . . . . . . . : QC2RIOC1
From procedure . . . . . . : _Ropen
Statement . . . . . . . . . : 28
To module . . . . . . . . . : QCPEXPRT
To procedure . . . . . . . : Check_tofile_parameter
Statement . . . . . . . . . : 1130 *PRCLT
Message . . . . : File is not opened.
Cause . . . . . : 1. You attempted to open a file for reading, but the file
does not exist. 2. You attempted to open a file for an output operation, but
the library does not exist. 3. You attempted to close a file that is not
open. 4. The open function ran out of internal memory. Recovery . . . :
1. When you use fopen or freopen, specific information on the exception
message is contained in _EXCP_MSGID declared in <stddef.h>. 2. When you use
_Ropen, handle I/O exceptions by specifying a signal handler for the SIGIO
signal. Technical description . . . . . . . . : The value of errno is set
to ENOTOPEN.

Message . . . . : Database file member copied to object.
Cause . . . . . : Database file member
/QSYS.LIB/QTEMP.LIB/QACP173785.FILE/QACP173785.MBR successfully copied to
object /tmp/ALEXANDER.xml in code page 37.

From module . . . . . . . . : QCPEXPRT
From procedure . . . . . . : Send_type_msg
Statement . . . . . . . . . : 2781
To module . . . . . . . . . : UULABELENV
To procedure . . . . . . . : UULABELENV
Statement . . . . . . . . . : 39800
Message . . . . : All records copied from file ENVELOPE in KDICHANGES.

I hope someone on the list will know why the error comes up. Maybe that's why there
aren't any records written to the Tmp folder.

Thanks,

Gary Kuznitz

On 4 Apr 2013 at 15:54, Gary (Gary Kuznitz <midrange-l@xxxxxxxxxxxx>) commented
about Data not getting written to /tmp:

Within an RPG program I am trying to copy a i5 file to the IFS. This same program
writes i5 information to the file. The file gets created in /tmp but the information
doesn't get written. This is my code:
D Path s 11 Inz('/tmp/')
C Eval CMDA = 'CPYTOIMPF ' +
C 'FROMFILE(ENVELOPE) '+
C 'TOSTMF('''+
C %Trim(Path)+
C %TRIM(LastFirst)+
C '.xml'') '+
C 'MBROPT(*REPLACE) '+
C 'TOCCSID(437) '+
C 'RCDDLM(*CRLF) '+
C 'DTAFMT(*FIXED)'

* Copy XML file to /tmp
** I changed the Callp to Call 'QCMDEXC'
C Eval CmdLength = %Len(%Trim(CmdA))
C Call 'QCMDEXC' 50
C parm cmda
C parm cmdlength
* Change Authorty on XML file
C Eval CMDA = 'CHGAUT ' +
C 'OBJ('''+
C %Trim(Path)+
C %TRIM(LastFirst)+
C '.xml'') '+
C 'USER(*PUBLIC) '+
C 'DTAAUT(*RWX)'

This is the authority I have for the /tmp folder

Work with Authority

Object . . . . . . . . . . . . : /tmp
Owner . . . . . . . . . . . . : QSYS
Primary group . . . . . . . . : *NONE
Authorization list . . . . . . : *NONE

Data -------------Data Authorities-------------
Opt User Authority Objopr Read Add Update Delete Execute

*PUBLIC *RWX X X X X X X
QSYS *RWX X X X X X X

This is the authority on the i5 file that is written to and copied from in this program:

Display Object Authority

Object . . . . . . . : ENVELOPE Owner . . . . . . . : QPGMR
Library . . . . . : KDICHANGES Primary group . . . : *NONE
Object type . . . . : *FILE

Object secured by authorization list . . . . . . . . . . . . : *NONE

Object
User Group Authority
QPGMR *ALL
*PUBLIC *ALL

Does anyone have any idea why the data wouldn't be written to the file?

Thanks,

Gary Kuznitz






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact