home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / viscobv6.zip / vac22os2 / ibmcobol / samples / smrtsort / sample4.c < prev    next >
Text File  |  1995-07-18  |  2KB  |  46 lines

  1. /**********************************************************/
  2. /*                                                        */ 
  3. /*  Licensed Material -- Property of IBM                  */    
  4. /*  5765-349                                              */
  5. /*  (c) Copyright IBM Corporation 1995                    */
  6. /*  All rights reserved                                   */
  7. /*                                                        */
  8. /**********************************************************/
  9.  
  10. /**********************************************************/
  11. /*                                                        */
  12. /* SMARTsort -- sample4.c                                 */
  13. /*                                                        */
  14. /* This program copies three files into one file.         */
  15. /*                                                        */
  16. /**********************************************************/
  17.  
  18. #pragma linkage (SMARTsort,system)
  19. #include <string.h>
  20.                                           
  21. void main(void)
  22. {
  23.  
  24.  char *copy_command="-s copy";
  25.  char copycommand[100];
  26.  
  27.  /* Define file names that will be used */
  28.  char *deptL92=" .\\data\\dept.L92"; 
  29.  char *deptJ69=" .\\data\\dept.J69"; 
  30.  char *dept403=" .\\data\\dept.403"; 
  31.  char *combined=".\\output\\dept.all "; 
  32.  int rc;
  33.  
  34.  /*********************************************************/
  35.  /* Build command string and call SMARTsort to copy files */
  36.  /*********************************************************/
  37.  strcpy(copycommand,copy_command);         
  38.  strcat(copycommand," -o ");
  39.  strcat(copycommand,combined);
  40.  strcat(copycommand,deptL92);
  41.  strcat(copycommand,deptJ69);
  42.  strcat(copycommand,dept403);
  43.  rc=SMARTsort(copycommand,NULL,NULL,NULL,NULL,NULL,NULL);
  44.  
  45. }
  46.