AddaByte    Programmers' Script Repository
Free and low cost software.
spacer
Find out about our beautiful fractal backgrounds at abm-enterprises


Newsletter Signup
Name
Email
 

  CL - Work File Uploader
 


Save up to 75% on software

Drive Clone

the best name in hosting


/* Program Id        -  AAC9202                                     **/
/* Description       -  E3ASR Upload Work File Builder              **/
/* Application       -  XYZ Store Management System                 **/
/* Business Unit     -  Merchandising                               **/
/* Developer         -  Don Waterfield                              **/
/* Date              -  08/23/2004                                  **/
/* Purpose           -  Upload records from the E3 Download Work,   **/
/*                      Validate the records and conditionally add  **/
/*                      to the SXF02E3, SXF04E3 files, IF no        **/
/*                      errors existed during validation.           **/
/* Notes             -  SYNCE3 is the a multi-member download       **/
/*                      work file.  Each member is named            **/
/*                      according to the user.  That member is      **/
/*                      manipulated by the user and uploaded        **/
/*                      during this process.                        **/
/*                                                                  **/
/*********************************************************************/
/*  REVISION HISTORY:                                               **/
/*  DATE      DEVELOPER     REASON/PROJECT NAME                     **/
/*  --------  ---------     ------------------------------------    **/
/*                                                                  **/
/*********************************************************************/
             PGM    PARM(&USR &ICN)

             DCL        VAR(&USR)       TYPE(*CHAR) LEN(10)
             DCL        VAR(&ICN)       TYPE(*CHAR) LEN(9)
             DCL        VAR(&RECOUNT)   TYPE(*DEC) LEN(10 0)
             DCL        VAR(&TRECOUNT)  TYPE(*CHAR) LEN(10)
             DCL        VAR(&ERRCOUNT)  TYPE(*DEC) LEN(10 0)
             DCL        VAR(&TERRCOUNT) TYPE(*CHAR) LEN(10)
             DCL        VAR(&PROC)      TYPE(*CHAR) LEN(30)
             DCL        VAR(&PROCDSC)   TYPE(*CHAR) LEN(100)
             DCL        VAR(&SPROC)     TYPE(*CHAR) LEN(30)
             DCL        VAR(&SPROCDSC)  TYPE(*CHAR) LEN(100)
             DCL        VAR(&TSTEPS)    TYPE(*CHAR) LEN(3)
             DCL        VAR(&CSTEP)     TYPE(*CHAR) LEN(3)
             DCL        VAR(&CMSG)      TYPE(*CHAR) LEN(255)
             DCL        VAR(&CPGM)      TYPE(*CHAR) LEN(30)
             DCL        VAR(&SWT)       TYPE(*CHAR) LEN(1)
             DCL        VAR(&ERROR)     TYPE(*DEC) LEN(1)

/* Check for object                                                  */
             CHKOBJ OBJ(*LIBL/UERRE3A) OBJTYPE(*FILE) MBR(&USR)

/* Member not found so create it.                                    */
             MONMSG CPF9815 EXEC(ADDPFM FILE(*LIBL/UERRE3A) MBR(&USR) +
               SHARE(*YES))

/* Override to the members needed                                   */
             OVRDBF     FILE(SYNCE3) TOFILE(*LIBL/SYNCE3) +
                        MBR(&USR) SHARE(*YES) SEQONLY(*NO)
             OVRDBF     FILE(UERRE3A) TOFILE(*LIBL/UERRE3A) +
                        MBR(&USR) SHARE(*YES) SEQONLY(*NO)

/* CLEAR ERRORS                                                      */
/* Clear old errors before this run                                  */
             CALL       PGM(AAC9374) PARM(&USR &RECOUNT)

/* Build Store Members if not present for qualified recs             */
             CALL       PGM(AAC9381) PARM(&USR)
/* Process                                                           */
             CALL       PGM(AAR9371) PARM(&USR &ICN &RECOUNT +
                                          &ERRCOUNT &TERRCOUNT)

/* Messaging                                                         */
             CHGVAR     VAR(&CMSG)      VALUE('E3ASR Upload Processing  +
                         has completed<BR><BR>There were <B>' +
                        *CAT &TERRCOUNT +
                        *CAT ' </B>Errors. +
                        <BR><BR>Thank you')

             CHGVAR VAR(&PROC) VALUE('E3ASRUPLOAD')
             CHGVAR VAR(&TSTEPS) VALUE('  1')
             CHGVAR VAR(&CSTEP) VALUE('  1')
             CHGVAR VAR(&CPGM) VALUE('AAC9371')
             CHGVAR VAR(&SWT) VALUE('U')
             CHGVAR VAR(&ERROR) VALUE(0)

/*  Update Users Process Record Message                              */
             CALL       *LIBL/AAC9244 PARM(&USR &PROC &PROCDSC +
                        &SPROC &SPROCDSC &TSTEPS &CSTEP &CMSG +
                        &CPGM &SWT &ERROR)

             CHGVAR VAR(&SWT) VALUE('C')

/*  Mark Users Process Record as Complete                            */
             CALL       *LIBL/AAC9244 PARM(&USR &PROC &PROCDSC +
                        &SPROC &SPROCDSC &TSTEPS &CSTEP &CMSG +
                        &CPGM &SWT &ERROR)

ERROR:
/* Clean up                                                          */
             DLTOVR     *ALL

ENDPGM:
             RCLRSC
             ENDPGM
  What does it do?
   no description given
 
  Features
  Added by Added Downloads Rating Popularity

  rpgivpgmr

6:01:06 AM Wednesday, July 2nd 2008

47

not rated

 
 
  About the file
  Size Download Rate It  

  5605 KB
  download this file
 
 
  Comments
no comments
 
  Add your comment
 Email  
 Subject  
 Comment  
 Verification code:

 
    All comments are screened by the admin prior to being posted
     
 
  Contacts
  Report Abuse