SUBROUTINE ASIGNA_CABECERA SCREEN MSM265A
ABORT IF (LEER ='N')
ABORT IF NOT CSV_1 /* si no hay datos return
/*ABORT IF (GRABAR_INVOICE ='SI')
SET 'PRIMER_REG ='
/* MSM265A
SET 'DSTRCT_CODE1I =' CSV_1
SET 'BRANCH_CODE1I =' CSV_2
SET 'BANK_ACCT_NO1I =' CSV_3
SET 'ACCOUNTANT1I =' CSV_4
SET 'SUPPLIER_NO1I =' CSV_5
SET 'INV_NO1I =' CSV_6
SET 'INV_DATE1I =' CSV_7
SET 'DUE_DATE1I =' CSV_8
SET 'INV_AMT1I =' CSV_9
SET 'CURRENCY_TYPE1I =' CSV_10
SET 'ADD_TAX_AMOUNT1I =' CSV_11
SET 'ATAX_CODE_HDR1I =' CSV_12
SET 'HANDLE_CDE1I =' CSV_13
SET 'AUTH_BY1I1 =' CSV_14
RETURN
SUBROUTINE ASIGNA_DETALLE SCREEN MSM265A
ABORT IF NOT CSV_1 /* si no hay datos return
ABORT IF (GRABAR_INVOICE ='SI')
/* MSM265A
SET 'INV_ITEM_DESC1I1 =' CSV_1
SET 'INV_ITEM_VALUE1I1 =' CSV_2
SET 'ACCOUNT1I1 =' CSV_3
SET 'INV_ITEM_DESC1I2 =' CSV_4
SET 'INV_ITEM_VALUE1I2 =' CSV_5
SET 'ACCOUNT1I2 =' CSV_6
SET 'INV_ITEM_DESC1I3 =' CSV_7
SET 'INV_ITEM_VALUE1I3 =' CSV_8
SET 'ACCOUNT1I3 =' CSV_9
RETURN
SUBROUTINE LEE_REG SCREEN MSM265A
ABORT IF (LEER ='N')
/* ABORT IF NOT CSV_1 /* si no hay datos return
ABORT IF (LEIDO_PROVEED ='SI')
IMPORT FILE F_ENT FORMAT CSV EXTRACT
ABORT IF NOT CSV_1 /* si no hay datos return
SET 'READ_CNTR=' READ_CNTR + '1'
SYSTEM 'ECHO LEIDOS ' READ_CNTR
ABORT IF (PRIMER_REG = 'SI')
ABORT IF NOT (CSV_1 = 'MLP')
SET 'GRABAR_INVOICE =' 'SI'
SET 'MUEVE_PRIMER_REG =' 'S'
PERFORM ASIGNA_CABECERA
RETURN
SUBROUTINE ESCRIBE_ENCAB MSM265A
ABORT IF (GRABAR_INVOICE ='SI')
ABORT IF (ESCRIBE_ENCABEZADO = 'N')
/* ABORT IF NOT CSV_1 /* si no hay datos return
SET 'WRITE_CNTR=' WRITE_CNTR + '1'
SYSTEM 'ECHO GRABADOS ' WRITE_CNTR
EXPORT FILE F_OK APPEND FORMAT CSV
. DSTRCT_CODE1I BRANCH_CODE1I BANK_ACCT_NO1I ACCOUNTANT1I &
SUPPLIER_NO1I INV_NO1I INV_DATE1I DUE_DATE1I &
INV_AMT1I CURRENCY_TYPE1I ADD_TAX_AMOUNT1I &
ATAX_CODE_HDR1I HANDLE_CDE1I AUTH_BY1I1
SET 'ESCRIBE_ENCABEZADO =' 'N'
/*SET 'LEER =' 'S'
RETURN
SUBROUTINE ESCRIBE_OK SCREEN MSM265A
ABORT IF (HAY_ERROR = 'S')
/* ABORT IF NOT CSV_1 /* si no hay datos return
PERFORM ESCRIBE_ENCAB
/*ABORT IF (LEER ='N')
ABORT IF NOT (ESCRIBIR_DETALLE = 'S')
SET 'WRITE_CNTR=' WRITE_CNTR + '1'
SYSTEM 'ECHO GRABADOS ' WRITE_CNTR
SET 'HAY_ERROR='
SET 'MESSAGE1='
SET 'MESSAGE2='
SET 'MUEVE_PRIMER_REG ='
SET 'ESCRIBIR_DETALLE =' 'S'
RETURN
SUBROUTINE DA_ENTER
KEY !SEND
RETURN
SUBROUTINE VER_SI_EOF SCREEN MSM265A
ABORT IF NOT (XERR2='Invoice')
ABORT IF CSV_1
PERFORM ESCRIBE_OK
SET 'F_FIN=' @DATE1I
SET 'H_FIN=' @TIME1I
PERFORM DISABLE_ALL
EXPORT FILE F_RES APPEND
. ' PROCESO * LOAD265 *'
. 'INICIO PROCESO = ' F_INI ' ,' H_INI
. 'FIN PROCESO = ' F_FIN ' ,' H_FIN
. 'REGISTROS LEIDOS = ' READ_CNTR
. 'REGISTROS O.K. = ' WRITE_CNTR
. 'REGISTROS CON ERROR = ' ERR_CNTR
KEY !F4 /* si no hay datos....press key F1
SYSTEM 'ECHO ****** F I N ******'
KEY !F1 /* si no hay datos....press key F1
RETURN
SUBROUTINE ABORTAR SCREEN MSM265A
ABORT IF NOT (XERR2='Invoice')
ABORT IF CSV_1
SET 'F_FIN=' @DATE1I
SET 'H_FIN=' @TIME1I
PERFORM DISABLE_ALL
EXPORT FILE F_RES APPEND
. ' PROCESO * LOAD265 *'
. 'INICIO PROCESO = ' F_INI ' ,' H_INI
. 'FIN PROCESO = ' F_FIN ' ,' H_FIN
. 'REGISTROS LEIDOS = ' READ_CNTR
. 'REGISTROS O.K. = ' WRITE_CNTR
. 'REGISTROS CON ERROR = ' ERR_CNTR
KEY !F4 /* si no hay datos....press key F1
SYSTEM 'ECHO ****** F I N ******'
KEY !F1 /* si no hay datos....press key F1
RETURN
SUBROUTINE ABORTAR_ERROR SCREEN MSM265A
SET 'F_FIN=' @DATE1I
SET 'H_FIN=' @TIME1I
PERFORM DISABLE_ALL
EXPORT FILE F_RES APPEND
. ' PROCESO * LOAD265 *'
. 'INICIO PROCESO = ' F_INI ' ,' H_INI
. 'FIN PROCESO = ' F_FIN ' ,' H_FIN
. 'REGISTROS LEIDOS = ' READ_CNTR
. 'REGISTROS O.K. = ' WRITE_CNTR
. 'REGISTROS CON ERROR = ' ERR_CNTR
KEY !F4 /* si no hay datos....press key F1
SYSTEM 'ECHO ****** F I N ******'
KEY !F1 /* si no hay datos....press key F1
RETURN
SUBROUTINE VER_WARNING SCREEN MSM265A
ABORT IF NOT (XERR='N.B.')
KEY
. !SEND
RETURN
SUBROUTINE CAMBIA_PROVEEDOR SCREEN MSM265A
ABORT IF NOT (CSV_1 ='MLP')
SET 'LEIDO_PROVEED =' 'SI'
SET 'MUEVE_PRIMER_REG =' 'S'
SET 'ESCRIBE_ENCABEZADO =' 'S'
ABORT IF NOT CSV_1
/* PERFORM DA_ENTER
RETURN
SUBROUTINE VER_WARNING2 SCREEN MSM265A
ABORT IF NOT (XERR='4493')
KEY
. !ENTER CURRENCY_TYPE1I !TO @CURRENCY_TYPE1I
. !SEND
/*PERFORM ESCRIBE_OK
PERFORM LEE_REG
PERFORM CAMBIA_PROVEEDOR
ABORT IF (CSV_1 ='MLP')
RETURN
SUBROUTINE VER_INVOICE SCREEN MSM265A
ABORT IF NOT (XERR2='Invoice')
PERFORM ESCRIBE_OK
EXPORT FILE F_OK APPEND FORMAT CSV
. '**** ' MESSAGE2
/*SET 'HAY_ERROR=' 'S'
SET 'GRABAR_INVOICE ='
SET 'MUEVE_PRIMER_REG =' 'S'
SET 'ESCRIBE_ENCABEZADO =' 'S'
/* SET 'ESCRIBIR_DETALLE =' 'S'
ABORT IF (CSV_1 ='MLP')
SET 'GRABAR_INVOICE =' 'SI'
SET 'MUEVE_PRIMER_REG ='
SET 'ESCRIBE_ENCABEZADO ='
PERFORM ABORTAR
RETURN
SUBROUTINE VER_SI_DAR_F3 SCREEN MSM265A
ABORT IF NOT CSV_1
ABORT IF NOT (XERR2='Invoice')
KEY !F3
RETURN
MANUAL MSM265A
SYSTEM 'DEL C:\MINT\DATA\LOAD265.ERR'
SYSTEM 'DEL C:\MINT\DATA\LOAD265.RES'
SYSTEM 'DEL C:\MINT\DATA\LOAD265.OK'
SET 'READ_CNTR=' '0'
SET 'WRITE_CNTR=' '0'
SET 'ERR_CNTR=' '0'
SET 'HAY_ERROR=' 'S'
SET 'MUEVE_PRIMER_REG =' 'S'
SET 'ESCRIBE_ENCABEZADO =' 'S'
SET 'ESCRIBIR_DETALLE =' 'S'
SET 'LEER =' 'S'
SET 'F_INI=' @DATE1I
SET 'H_INI=' @TIME1I
SET 'LEIDO_PROVEED ='
SET 'PRIMER_REG=' 'SI'
SET 'GRABAR_INVOICE ='
PERFORM ENABLE_SCREENS
KEY !F3
DYNAMIC MSM265A
TRIGGER @ERRMESS1I
. VALUE ' ' /* No error,
. TRIGGER @FKEYS1I
/*. . VALUE 'XMIT-Validate, F5-Previous'
/*. . PERFORM DA_ENTER
. . VALUE 'XMIT-Validate'
. . PERFORM ESCRIBE_OK
. . SET 'HAY_ERROR =' 'N'
. . PERFORM LEE_REG
. . PERFORM VER_SI_EOF
. . SET 'LEIDO_PROVEED ='
. . PERFORM ASIGNA_CABECERA
. . SET 'LEER =' 'S'
. . PERFORM LEE_REG
. . PERFORM ASIGNA_DETALLE
. . PERFORM MUEVE_DATOS_P1
. . SET 'LEER =' 'N'
. . ABORT IF NOT CSV_1
. . ABORT IF NOT (GRABAR_INVOICE ='SI')
. . PERFORM DA_ENTER
. . VALUE 'XMIT-Update'
. . PERFORM ESCRIBE_OK
. . SET 'HAY_ERROR =' 'N'
. . PERFORM LEE_REG
. . PERFORM VER_SI_EOF
. . SET 'LEIDO_PROVEED ='
. . PERFORM ASIGNA_CABECERA
. . SET 'LEER =' 'S'
. . PERFORM LEE_REG
/*. . PERFORM CAMBIA_PROVEEDOR
/*. . ABORT IF (CSV_1 ='MLP')
. . PERFORM ASIGNA_DETALLE
. . PERFORM MUEVE_DATOS_P1
. . ABORT IF CSV_1
. . PERFORM DA_ENTER
. . VALUE 'XMIT-Confirm'
/*. . SET 'GRABAR_INVOICE ='
/*. . SET 'MUEVE_PRIMER_REG =' 'S'
/*. . PERFORM ASIGNA_CABECERA
. . PERFORM ESCRIBE_OK
. . PERFORM DA_ENTER
. VALUE'' /* An error has occurred
. SET 'XERR='@ERRMESS1I[1,4]
. SET 'MESSAGE1='@ERRMESS1I
. PERFORM VER_WARNING
. ABORT IF (XERR='N.B.')
. PERFORM VER_WARNING2
. ABORT IF (XERR='4493')
. SET 'XERR2='@ERRMESS1I[1,7]
. SET 'MESSAGE2 ='@ERRMESS1I
. PERFORM VER_INVOICE
. PERFORM VER_SI_DAR_F3
. ABORT IF (XERR2='Invoice')
. EXPORT FILE F_ERR APPEND FORMAT CSV
. . DSTRCT_CODE1I BRANCH_CODE1I BANK_ACCT_NO1I ACCOUNTANT1I &
SUPPLIER_NO1I INV_NO1I INV_DATE1I DUE_DATE1I &
INV_AMT1I CURRENCY_TYPE1I ADD_TAX_AMOUNT1I &
ATAX_CODE_HDR1I HANDLE_CDE1I AUTH_BY1I1
. EXPORT FILE F_ERR APPEND FORMAT CSV
. . INV_ITEM_DESC1I1 INV_ITEM_VALUE1I1 AUTH_BY1I1 ACCOUNT1I1 &
INV_ITEM_DESC1I2 INV_ITEM_VALUE1I2 AUTH_BY1I1 ACCOUNT1I2 &
INV_ITEM_DESC1I3 INV_ITEM_VALUE1I3 AUTH_BY1I1 ACCOUNT1I3 &
'MSM265A : ' @ERRMESS1I
. SET 'HAY_ERROR=' 'S'
. SET 'ERR_CNTR=' ERR_CNTR + '2'
. PERFORM ABORTAR_ERROR
Hi! Got Carlin's NGB261 and are looking at modifications, just getting compile errors in version 4.1. The MINT Script is not my favorite option either.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.