Previous Topic Next topic Print topic


Rebuild the project

To see the differences between build and rebuild, follow these steps:

  1. Change the contents of the include file you added earlier to:
    /* Micro Focus Open PL/I Include File */
      put skip list ('jim', MSG);
  2. Make sure Build Option in the include file's properties is set to Content.
  3. Change the contents of Program1.pli to:
    /* Micro Focus Open PL/I Console Application */
     %replace MSG by 'From include - main';
     Program1: proc options (main);
       dcl sub entry;
       dcl a1 char(14);
       put skip list ('Hello world - main' );
       %include 'Include1.inc';
       call sub();
       put skip;
       get list (a1);
      
     end Program1;
  4. Change the contents of sub.pli to:
    /* Micro Focus Open PL/I program */
     %replace MSG by 'From include - sub';
    
    sub: proc;
       put skip list ('Hello world sub' );
       %include 'Include1.inc';
    end sub;
  5. Go to the project's properties and click the PL/I tab.
  6. In the General section, set Enable Macro Preprocessor to Yes.
  7. Click File > Save All to save your changes.
  8. On the Visual Studio menu bar, click Build > Rebuild Solution and inspect the Output window. This will compile both Program1.pli and sub.pli.
  9. On the menu bar, click Build > Build Solution. You will now get the following message in the output window:
    		Program1.pli is up-to-date
    		sub.pli is up-to-date
    		PL/I compile: 2 item(s) succeeded or up-to-date, 0 failed.

    If you change one of the source files and then click Build > Build Solution, only that program will be compiled.

    If you change the include file, both programs will be compiled, because it is included in both of them. Any program that does not use the include file, will not be re-compiled.

Previous Topic Next topic Print topic