× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



You can have USROPN and when you are opening file check file is open or not

If not %open(fileName);
Open fileName;
Endif;



Regards,

Chamara Withanachchi
IBM Certified Power System Expert
RPG Programmer
(owner of www.rpgiv.info)

WWW.RPGIV.INFO
Mob: +971 50 5698644
Tel: +971 6 5595887
chamaraw@xxxxxxxxxx
www.rpgiv.info
i want to be future ready. i want control. i want an i.


Sent from my BlackBerry® wireless device

-----Original Message-----
From: "PAPWORTH Paul" <Paul.PAPWORTH@xxxxxxxx>

Date: Fri, 17 Jul 2009 17:37:09
To: <rpg400-l@xxxxxxxxxxxx>
Subject: File already open in a RPG *Module


I have a programme which calls a another programme which itself is made up of 5 Modules. The Main PEP module calls (callp) one of the 4 modules depending upon a message type. The same file is opened in each of these 4 modules and this file is opened by the RPG cycle. Each of these 4 modules terminates with a RETURN. When calling the module SWX88CTTG we are getting an RPG error File already open. Any ideas what I am doing wrong ? We have rejected the USROPN solution because we believe this should work as it does with the two modules SWX88HBG and SWX88FCG.



Eg Program A

Calls Program B

In program B we have



Select;

When %subst(SwdCOpe : 1 : 2) = 'HB';

Callp SWX88HBG(p_adh : P_fZSTDSWI : P_fCMESSAG :

P_fXINTERN : P_fZDTASTR : P_Statut);

When %subst(SwdCOpe : 1 : 2) = 'FC';

Callp SWX88FCG(p_adh : P_fZSTDSWI : P_fCMESSAG :

P_fXINTERN : P_fZDTASTR : P_Statut);

When %subst(SwdCOpe : 1 : 3) = 'CTT';

Callp SWX88CTTG(p_adh : P_fZSTDSWI : P_fCMESSAG :

P_fXINTERN : P_fZDTASTR : P_Statut);

When %subst(SwdCOpe : 1 : 3) = 'IDO';

Callp SWX88IDOG(p_adh : P_fZSTDSWI : P_fCMESSAG :

P_fXINTERN : P_fZDTASTR : P_Statut);

When %subst(SwdCOpe : 1 : 3) = 'IRI';

Callp SWX88IDOG(p_adh : P_fZSTDSWI : P_fCMESSAG :

P_fXINTERN : P_fZDTASTR : P_Statut);

Other;

Lzone_ano = 'Code opération inconnu' + SwdCOpe ;

exsr TrtErreur;

P_Statut = 'RJX';

EndSl;





In each of these modules we have the file (LF) TRLPARL0 opened by the cycle





Message ID . . . . . . : CPF4132 Severity . . . . . . . : 40

Message type . . . . . : Escape

Date d'envoi . . . . . : 17/07/09 Heure d'envoi . . . . : 17:09:29



Message . . . . : Membre TRLPARL0 du fichier TRLPARL0 de FICG déjà ouvert ou

comporte une erreur.





Message ID . . . . . . : RNX1215 Severity . . . . . . . : 99

Message type . . . . . : Escape

Date d'envoi . . . . . : 17/07/09 Heure d'envoi . . . . : 17:09:29



Message . . . . : OPEN effectué sur fichier ouvert TRLPARL0.

Cause . . . . . : La procédure RPG SWX88CTTG du programme ITG824/SWX88SLAG a

tenté d'ouvrir le fichier TRLPARL0, alors que ce dernier était déjà ouvert.

Que faire . . . : Adressez-vous au responsable de la maintenance logicielle

afin de déterminer la cause de l'incident.





When the programme falls over it has already successfully completed the processing of 2 messages by a CALLP to SWX88HBG

And SWX88FCG. When calling the SWX88CTTG it falls over.







This is how the file is declared in the 3 modules



FTRLPARL0 IF E K DISK





This is how the programme object is compiled







Informations sur un programme Page 1

722SS1 V5R4M0 060210 BROUSSE 17/07/09 17:31:18 CEST

Programme . . . . . . : SWX88SLAG Bibliothèque . . . . . : ITG824

Propriétaire . . . . . : QPGMR

Attribut du programme : RPGLE

Détail . . . . . . . . : *BASIC

Informations sur la création du programme:

Date et heure de création du programme . . . . : 17/07/09 15:35:47

Type du programme . . . . . . . . . . . . . . : ILE

Module de la procédure d'entrée de programme . : SWX88SLAG

Bibliothèque . . . . . . . . . . . . . . . . : XYLD403A10

Attribut du groupe d'activation . . . . . . . : *CALLER

Groupe d'activation partagé . . . . . . . . . : *NO

Profil utilisateur . . . . . . . . . . . . . . : *OWNER

Utilisation des droits adoptés . . . . . . . . : *YES

ID codé de jeu de caractères . . . . . . . . . : 65535

Nombre de modules . . . . . . . . . . . . . . : 5

Nombre de programmes de service . . . . . . . : 5

Nombre de références non résolues . . . . . . : 0

Nombre de copyrights . . . . . . . . . . . . . : 0

Ensemble des données de création . . . . . . . : *YES

Informations observables comprimées . . . . . : *NO

Informations d'exécution comprimées . . . . . : *NO

Mise à jour admise . . . . . . . . . . . . . . : *YES

Mise à jour du nom de bibliothèque *SRVPGM lié

admise . . . . . . . . . . . . . . . . . . . : *NO

Données de profilage . . . . . . . . . . . . . : *NOCOL

Procédure d'entrée de programme avec espace

mémoire à téraoctets . . . . . . . . . . . . : *YES

Modules avec espace mémoire à téraoctets . . . : *ALL

Modèle d'espace mémoire . . . . . . . . . . . : *SNGLVL

Descriptif . . . . . . . . . . . . . . . . . . :

tatistiques du programme:

Nombre de paramètres . . . . . . . . . . . . . : 0 255

Taille de l'espace associé (décomprimé) . . . : 4096

Taille de la mémoire statique . . . . . . . . : 207200

Réinitialisation de la mémoire statique admise : *NO

Taille du programme . . . . . . . . . . . . . : 3792896

Etat du programme . . . . . . . . . . . . . . : *USER

Domaine du programme . . . . . . . . . . . . . : *USER

Programme créé en édition . . . . . . . . . . : V5R4M0

Programme créé pour édition . . . . . . . . . : V5R4M0

Exécution possible à partir de l'édition . . . : V5R4M0

Conversion requise . . . . . . . . . . . . . . : *NO

Performances du programme:

Pool de pagination . . . . . . . . . . . . . . : *USER

Volume de pagination . . . . . . . . . . . . . : *BLOCK

Informations sur un programme Page 2

5722SS1 V5R4M0 060210 BROUSSE 17/07/09 17:31:18 CEST

Programme . . . . . . : SWX88SLAG Bibliothèque . . . . . : ITG824

Propriétaire . . . . . : QPGMR

Attribut du programme : RPGLE

Détail . . . . . . . . : *SIZE

Taille du programme (décomprimé) et maxima:

Taille totale du programme (ko):

En cours . . . . . . . . . . . . . . . . . . : 3704

Maximale . . . . . . . . . . . . . . . . . . : 268435456

Nombre de modules:

En cours . . . . . . . . . . . . . . . . . . : 5

Maximale . . . . . . . . . . . . . . . . . . : 32767

Nombre de programmes de service:

En cours . . . . . . . . . . . . . . . . . . : 5

Maximale . . . . . . . . . . . . . . . . . . : 32766

Taille du répertoire de chaînes (octets):

En cours . . . . . . . . . . . . . . . . . . : 41

Maximale . . . . . . . . . . . . . . . . . . : 16777184

Taille des chaînes de copyright (octets):

En cours . . . . . . . . . . . . . . . . . . : 0

Maximale . . . . . . . . . . . . . . . . . . : 16777184

Nombre de segments de mémoire secondaire:

En cours . . . . . . . . . . . . . . . . . . : 10

Maximale . . . . . . . . . . . . . . . . . . : 16384

Taille de la mémoire statique (octets):

Minimale . . . . . . . . . . . . . . . . . . : 207200

Maximale . . . . . . . . . . . . . . . . . . : 207200

Page 3

Programme . . . . . . : SWX88SLAG Bibliothèque . . . . . : ITG824

Propriétaire . . . . . : QPGMR

Attribut du programme : RPGLE

Détail . . . . . . . . : *MODULE

Date de Niveau Données de

Module Bibliothèque Attribut création optimisation débogage

SWX88SLAG XYLD403A10 RPGLE 17/07/09 *NONE *YES

SWX88HBG XYLD403A10 RPGLE 17/07/09 *NONE *YES

SWX88CTTG XYLD403A10 RPGLE 17/07/09 *NONE *YES

SWX88FCG XYLD403A10 RPGLE 17/07/09 *NONE *YES

SWX88IDOG XYLD403A10 RPGLE 17/07/09 *NONE *YES

Informations sur un programme Page 4

5722SS1 V5R4M0 060210 BROUSSE 17/07/09 17:31:18 CEST

Programme . . . . . . : SWX88SLAG Bibliothèque . . . . . : ITG824

Propriétaire . . . . . : QPGMR

Attribut du programme : RPGLE

Détail . . . . . . . . : *SRVPGM

Programme

de service Bibliothèque Signature

SX_MSGQUE *LIBL 367FFDD8FC86BD97EF9581FDB800FF63

QRNXIE QSYS D8D9D5E7C9C540404040404040404040

QRNXIO QSYS D8D9D5E7C9D640404040404040404040

QRNXUTIL QSYS D8D9D5E7E4E3C9D34040404040404040

QLEAWI QSYS 44F70FABA08585397BDF0CF195F82EC1

Informations sur un programme Page 5

5722SS1 V5R4M0 060210 BROUSSE 17/07/09 17:31:18 CEST

Programme . . . . . . : SWX88SLAG Bibliothèque . . . . . : ITG824

Propriétaire . . . . . : QPGMR

Attribut du programme : RPGLE

Détail . . . . . . . . : *ACTGRPEXP

Exportations du groupe d'activation :

Elément de données Taille

(Aucune exportation de groupe d'activation)

Informations sur un programme Page 6

5722SS1 V5R4M0 060210 BROUSSE 17/07/09 17:31:18 CEST

Programme . . . . . . : SWX88SLAG Bibliothèque . . . . . : ITG824

Propriétaire . . . . . : QPGMR

Attribut du programme : RPGLE

Détail . . . . . . . . : *ACTGRPIMP

Importations du groupe d'activation :

Elément de données

(Aucune importation de groupe d'activation)

Informations sur un programme Page 7

5722SS1 V5R4M0 060210 BROUSSE 17/07/09 17:31:18 CEST

Programme . . . . . . : SWX88SLAG Bibliothèque . . . . . : ITG824

Propriétaire . . . . . : QPGMR

Attribut du programme : RPGLE

Détail . . . . . . . . : *COPYRIGHT

Informations de copyright :

(Aucune information de copyright)





Thanks for any help

Sorry about the foreign language


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.