1

Bon, j'essaie d'accéder à un fichier multimembre AS400 par requête SQL, mais j'arrive toujours sur le premier membre du fichier. Est-il possible d'accéder à tous les membres, et si oui, comment ?
Quelle est la syntaxe à utiliser ?

Merci d'avance !

Jaws

2

Bonjour,

Afin de pouvoir accéder à un membre spécifique sur l'AS/400 via SQL, il faut créer un ALIAS en SQL :

1. Create an alias for it in an sql statement

CREATE ALIAS SGPWORK/UGEOCRI FOR SGPDATA/GMITOGCRIF (GMITOGLM01)

This allows to SQL the member GMITOGLM01in the file GMITOCCRIF in SGPDATA by creating an object called UGEOCRI in SGPWORK.

2. You can then use your alias in a select statement (have tried delete, insert or update. it might work. then again it might not) as if it was a regular file.

3. Once you are done, delete the alias in an sql statement

DROP ALIAS SGPWORK/UGEOCRI

Bon courage