PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Windev 14 AS400
Windev 14 AS400
Débuté par Mitxel, 28 sep. 2009 13:08 - 1 réponse
Posté le 28 septembre 2009 - 13:08
¿Alguien sabria decirme si con WinDev 14 se puede copiar ficheros y bibliotecas completas de AS400 a otra bibliotecas?

Saludos,
Valencia
Posté le 28 septembre 2009 - 17:46
Aquí tienes información de lo que pides, pero esta información como ves está en Ingles. Pero menos da una piedra.

The AS400 Native Access installation on the AS400 is done thru the Easycom PC installation program. Just have to checkmark 'AS400 part' in one of the windows and follow the instructions. It creates a subsystem on the AS400 called Easycom from wich all your Windev sessions will run. Afterward you have to register your Easycom license(s) thru the Easycom management program on your PC. You have one Easycom 'development' license per Windev developper and one unlimited 'deployment' license used by all your company users.

Once Easycom installed and registered, create a new user profile on the AS400 (WRKUSRPRF) with a non expiring password that will be used for all your Windev projects analysis connexions. Give this user (we named it WINDEV) the appropriate Job Description (JOBD) pointing first to your company production library(ies).
In Windev, open or create your project analysis. Under 'Analysis' menu, goto 'Connexions...' menu and create a new connexion selecting 'AS400 native access' pointing on your network AS400 name and using your newly created AS400 user code (WINDEV) and password. You can test the connexion from this window to be sure it's Ok.
Once done, you're ready to import in your Windev project all the AS400 files structures needed by your application. Find the 'Import file structure' option in one of the Windev analysis menus and follow the instructions to import the physical file(s) structure. This process will have to be repeated for each file but you can specify 'wild cards' in the import window file name. You can select file(s) in this window from a list or type in their name. If you type them, press ENTER before going with the 'Next' button. Once imported, in the analysis schema, AS400 files will be blue.
When you import AS400 file structures, file logical indexes are automatically imported except for indexes with inclusions or exclusions. If you need those logical indexes in your project, you can import them separately. They will be seen as independant files in the analysis.

After applying analysis to your project (flag icon), the AS400 files can be reached thru the Windev native file commands (HRead..., HModify(), etc) or thru SQL queries.

Access to AS400 files from Windev project will be defaulted to the connexion name you defined in your analysis for the file. If your application needs to identify users, ask them to identify themselves thru a Windev 'Login' window at application startup with its AS400 user code and password and use the Windev 'HCreateConnexion', HChangeConnexion', 'HOpenConnexion' and 'HCloseConnexion' commands (see Easycom and Windev help) to create a temp. 'virtual' connexion for each one of them automatically validated by Easycom (as if they were login in thru a 5250 screen).

Last thing, Windev and Easycom uses the JOBD defined for the AS400 user code you use to HOpenConnexion(). If this JOBD points to production librairies and you have to develop and test your application on your company test librairies, you can use the WINDEV user as your test user. From your Windev application 'Login' window, use the 'WINDEV' user to identify this is a test session and afterward use the Windev ASExec() commands to change the session library list (store the login user code in a global variable named gcLoginUserCode).
Example:
IF gcLoginUserCode = "WINDEV" THEN
ASExec("RMVLIBL PRODLIB")
ASExec("ADDLIBL TESTLIB")
END
so login in with the WINDEV user will change the session libray list to TESTLIB first.

I know this a lot of information and hints but I hope this is what you need.

Saludos
Salvador Soler
www.windeveloper.es