Skip to main content

j'aimerais savoir comment manipuler les fichiers classiques avec microfocus cobol2.1 j'ai eu pas mal de probleme dans la lecture et l'ecriture sur les fichiers file locked ou record locked sachant que l'application repose sur un partage des fichiers entre divers utilisateurs et qu'elle marchait parfaitement avec l'ancien compilateur

j'aimerais savoir comment manipuler les fichiers classiques avec microfocus cobol2.1 j'ai eu pas mal de probleme dans la lecture et l'ecriture sur les fichiers file locked ou record locked sachant que l'application repose sur un partage des fichiers entre divers utilisateurs et qu'elle marchait parfaitement avec l'ancien compilateur

Ran through google translate:

"I would like to know how to handle files with conventional microfocus cobol2.1 I had quite a problem in reading and writing files on locked file or record locked knowing that the application is based on sharing files between various users and it worked perfectly with the old compiler"

What is the specific problem that you are experiencing?

Multiuser record locking on files is controlled either through options specified in the SELECT statement for your file such as:

LOCK MODE MANUAL/AUTOMATIC

or

SHARING WITH ALL OTHER/NO OTHER

or with compiler directives like:

AUTOLOCK
DETECTLOCK
RETRYLOCK

or in the file handler configuration file extfh.cfg

IGNORELOCK
OPENINPUTSHARED
RETRYLOCK
RETRYOPEN
RUNITLOCKDETECT
SKIPLOCK

Which options you should set depend on the behavior that you wish to achieve.

If your behavior is now different than in a previous product version then perhaps you were previously setting one of these compiler directives or you were using a extfh.cfg file and you are no longer doing so.

Please check your old product setup and make sure that you are using identical directives and configuration options.

Thanks.


j'aimerais savoir comment manipuler les fichiers classiques avec microfocus cobol2.1 j'ai eu pas mal de probleme dans la lecture et l'ecriture sur les fichiers file locked ou record locked sachant que l'application repose sur un partage des fichiers entre divers utilisateurs et qu'elle marchait parfaitement avec l'ancien compilateur

bonjour

je voudrais en premier temps vous remercier et par la meme occasion mieux presenter la problematique

premierement il faut noter  qu'il s'agit d'une application multiuser utilisant des fichiers plats developpée avec microfocus cobol version 4.1.20-e avec hp-unix comme system d'exploitation.

la maniere dont on utilisait ces fichiers etait la suivante:

FILE-CONTROL.

           SELECT decltgt   ASSIGN TO "DECLTGT"

                  ORGANIZATION IS INDEXED

                  ACCESS MODE IS random

                  lock mode is automatic with lock on record

                  RECORD KEY IS GR-DEC.

      DATA DIVISION.

      FILE SECTION.

      FD  DECLTGT .

      01  DECL.

             02  GR-DEC.

                 03 DSANNRCT PIC 9999.

                 03 DSMOIRCT PIC 99.

                 03 DSCDERCT PIC 9(3).

                 03 DSTYPDCL PIC X.

                 03 DSCDERBQ PIC 9(9).

apres les declarations et dans la procedure division

open output DECLTGT .

.......

..........

traitements

........

.........

write DECL

                     invalid key display "ERREUR ECR" at 2401

                                 display vh-enr at 2501

                      accept tac at 2301.

en migrant vers microfocus visual cobol 2.2  avec unix (redhat 60.2) l'erreur file locked ou record locked est tres frequente et on savait pas qu'est qu'il a changé d'une version à l'autre.

autre probleme c'est l'utilisation de forms2 pour la realisation des erans qui a ete delaissé avec le nouvel compilateur et on sait plus par quoi le remplacer et comment dessiner nos ecrans.

3eme point interessant peut on faire une adaptation des solutions graphique telque les forms les boutons les champs texte vers une solution mode caractere.

merci pour votre collobaration et bonne journée


j'aimerais savoir comment manipuler les fichiers classiques avec microfocus cobol2.1 j'ai eu pas mal de probleme dans la lecture et l'ecriture sur les fichiers file locked ou record locked sachant que l'application repose sur un partage des fichiers entre divers utilisateurs et qu'elle marchait parfaitement avec l'ancien compilateur

I will address these items separately.

1. Record Locking.

Are these file lock (status 9/065) or record lock (status 9/068) conditions being returned or both?
I assume that the OPEN OUTPUT statement in your code example is not actually being used because files opened for output are not sharable.

Are these lock conditions valid or are they being reported when indeed no record is locked in the file?

Because of how indexed files work it is possible that a file may be placed into a temporary locked condition by the file handler when the file is being updated.

You can usually get around these types of locks by using the RETRYLOCK directive or the RETRYLOCK configuration option in conjunction with the RETRYTIME option to specify how long to wait for the lock to be released if your program is setup to capture and report on actual record locked conditions.

You can also use RETRYOPEN if you are getting a locked file status on an open of a file.

If this does not solve the problem for you then you should open up a support incident with customer care so that we can investigate further.

2.Forms2

Forms2 was a character based UI design tool that generated enhanced ACCEPT/DISPLAY sources that could be compiled. This tool was actually removed many years ago and was not included in anmy of the Net Express/Server Express products either.

Although the tool itself is gone the code that it generated should be compatible with Visual COBOL so you should still be able to compile your applications.

Any new development would have to be coded manually using ADIS syntax or screen sections or character based Dialog System.

Maybe others could add suggestions here as to what they have used in the past...

3. Clarification?

Sorry, I do not speak French and the Google Translation of this paragraph does not make sense to me.

"3rd item interesting you can make an adaptation of the graphic solutions telque the forms buttons text fields to a fashion character solution"

What is it that you are asking for here?

Thanks.