Adding sources already registered in a workspace, to more than one project without using the manual interfaces (GUI)?
Is there an easy way to add sources already registered in a workspace, to more than one project without using the manual interfaces (GUI)?
The best solution is to use CreatePCF.bj and ApplyPCF.bj batch processes as follows...
A. Using CreatePCF.bj
1. Amend attached CreatePCF.bat to match the required environment and workspace.
NOTE : The directory defined in the OUT parameter/option MUST exist or the process will fail.
2. Run CreatePCF.bat from a command prompt, "As Administrator" with an Enterprise Analyzer MASTER user ID..
3. The output from the CreatePCF.bat will be in the file defined in the OUT parameter.
NOTE : In the attached CreatePCF.bat, the OUT parameter/option is defined as
This gives the layout of the PCF file and sets the workspace “ready” for the ApplyPCF process.
An output example file ( AddFilesToProject.pcf ) is included in the attached zip file.
The entries we are interested in are
COBOL "PROGRAM1.CBL" "SQLEXTrainingWS"
COBOL “PROGRAM2.CBL" " SQLEXTrainingWS "
COPYBOOK “COPYBOOK1.CPY” “SQLEXTrainingWS”
4. Copy the file created by CreatePCF.bj ( AddFilesToProject.pcf )
5. Rename it to AddFilesToProject-Edit.pcf
6. Amend it to contain the files you wish to add and which projects you want them to be added to .
NOTE : The entities MUST already be in the workspace.
The example adds program PROGRAM1.CBL to a new project called NewProject.
The example adds program PROGRAM2.CBL to the project called NewProject and a new project called NewProject1.
The example adds copybook COPYBOOK1.CPY to projects NewProject and NewProject1.
The attached file ( AddFilesToProject-Edit.pcf ) is an edited.
The file entries look like this...
COBOL "PROGRAM1.CBL" "NewProject"
COBOL “PROGRAM2.CBL" "NewProject" "NewProject1"
COPYBOOK “COPYBOOK1.CPY” “NewProject” NewProject1”
This can be used for any entity type...BMS, PCT, COBOL, PLI, COPYBOOK, JCL
B. Using ApplyPCF.bj
1. Amend the attached ApplyPCF.bat to match the required environment and workspace.
2. Make sure the ProjectCF parameter/option points to the file created created earlier ( AddFilesToProject-Edit.pcf ).
3. Run ApplyPCF.bat from a command prompt, "As Administrator" with an Enterprise Analyzer MASTER user ID.
NOTE : You must close any open EA sessions and re-open them to see the new projects.
NOTE : Any new projects will not be shared, for everyone with access to the workspace.
Incident # 2612187