Information Systems:Compiling ASW Programs and Objects

From uniWIKI
Jump to navigation Jump to search

(Note that the following is how I understand ASW to work; but it may not be correct.)

ASW uses shared access paths. When you run a job, all the files used by any of the programs that can possibly be called are pre-opened in either input or update mode. The cross reference is read to determine which files to open, and in what mode.

In PDM, option AC (for ‘ASW Compile’) will compile the object, and add it to this cross reference. AC works for all compiles; program, files, etc.

If you add a custom program, which is the only program that updates a particular file, to an existing flow, it will bomb. As no associated program in the cross reference updates the file, it will be pre-opened in input only mode. There are two ways of fixing this. The only way a custom program could have been added is to have called it from an ASW program. Add the file in update mode to that program, and compile it with AC. That will update the cross reference, and change the pre-open mode of that file from input to update. Or compile the custom program itself with AC.

When you compile a physical or logical file, a version will be put into the data libraries for all companies. A reference copy will also be placed into the same library the source is in (for example, XX2480BQ). When you compile a logical file, there must be a reference copy of the physical file in the source library. If there is not, you will see the message 'Physical file ANOBOB is missing in library XX2480BQ, compile of logical file ANXBOB can NOT be done.' To create it, key in WRKOBJ ANOBOB and press enter.

                              Work with Objects                                
                                                                               
Type options, press Enter.                                                     
  2=Edit authority        3=Copy   4=Delete   5=Display authority   7=Rename   
  8=Display description   13=Change description                                
                                                                               
Opt  Object      Type      Library     Attribute   Text                        
__   ANOBOB      *FILE     UP1480BFPL  PF          Balance opening balance val 
__   ANOBOB      *FILE     A450AP      PF          Balance opening balance val 

Use option '3=Copy' against the most recent reference file; in this case in library A450AP - not in the data library (UP1480BVxx).

                      Create Duplicate Object (CRTDUPOBJ)                      
                                                                               
Type choices, press Enter.                                                     
                                                                               
From object  . . . . . . . . . . > ANOBOB        Name, generic*, *ALL          
From library . . . . . . . . . . > A450AP        Name, *LIBL, *CURLIB          
Object type  . . . . . . . . . . > *FILE         *ALL, *ALRTBL, *AUTL...       
To library . . . . . . . . . . .   XX2480BQ      Name, *FROMLIB, *SAME...      
New object . . . . . . . . . . .   *OBJ          Name, *OBJ, *SAME             
From ASP device  . . . . . . . .   *             Name, *, *CURASPGRP, *SYSBAS  
To ASP device  . . . . . . . . .   *ASPDEV       Name, *ASPDEV, *...           
Duplicate data . . . . . . . . .   *NO           *NO, *YES                     
Duplicate constraints  . . . . .   *YES          *YES, *NO                     
Duplicate triggers . . . . . . .   *YES          *YES, *NO                     
Duplicate file identifiers . . .   *NO           *NO, *YES                     
Duplicate access control . . . .   *ALL          *ALL, *ROW, *COL, *NONE       

Change the 'To Library' to where the source you are compiling is located, and press enter.

If you are changing an existing custom program, the way of telling which compile to use, is to see if the program is already in the cross reference. If it is, use AC; if not, use 14.

Go  crossref
Select option 2. Enquire on program structure
Key the program name into ‘Pgm’ and press enter

If nothing comes up, and the program does use files, it is not in the cross reference.