How to create a table on an AS/400 with an RPG or CLP program

whinpo

Member
Hi,

we need to be able to create a table on our AS/400 Enterprise Server via a CL or an RPG program because it has to be done during the night just after the save (JDE stopped)

We've seen there is a BSFN called Create Table found in PD7333/CDBASE.

We've discovered there is a way to run a SRVPGM on AS/400 using an API called : QZRUCLSP

Our problem is that we've never used API in our programs, and we don't even have a clue how to use that....

Any help, with eventually an example would be more than appreciated :D

Thanks by advance
 
Use the command CRTPF in either a CL program or in the jobscheduler WRKJOBSCDE.

I don't understand why the file cannot be there permanently, why must you create it every night?
 
hi,

I wanna do that in case of a table structure modification, for an already in production table.
in fact I want to be able to generate the JDE table when I stop JDE during the night for the save, just before the packages are installed on the citrix servers.I can't do it while JDE is running (table locked by the *SQLPKG)
So I wanna create a CL that will check if there are files to deploy (wed create a file holding the tables names we wanna generate), rename the existing file, create it using the JDE specs and copy the data from the old table to the new modified one.
to create a file using the JDE specs, there is a SRVPGM (PD7333/CDBASE) that exports a function called Table Create.
And I wanna be able to call this function

I hope my explanations are clearer.
 
Back
Top