* * Copyright (c) 1994 * J. D. Edwards & Company * * This unpublished material is proprietary to * J. D. Edwards & Company. All rights reserved. * The methods and techniques described herein are * considered trade secrets and/or confidential. * Reproduction or distribution, in whole or in part, * is forbidden except by express written permission * of J. D. Edwards & Company. * * ---------------------------------------------------------------- * * PROGRAM REVISION LOG * -------------------- * * Date Programmer Nature of Revision * -------- ---------- ------------------------------------ * 10/01/04 xxxxxxxxxx SAR # 20185 (AS/400 A/G) * * A0010 - Standard Subfile Inquiry Program Type * This program type provides the standard single * cycle processing for inquiry and display of * multiple records in a subfile. * ***************************************************************** * ***************************************************************** ***************************************************************** * PROGRAM TABLES AND ARRAYS * ------------------------- * * * * Copy Member for Composite Common Subroutine - C0012 * ***************************************************************** * * Copy Member for Composite Common Subroutine - C9803 * ***************************************************************** * * Copy Member for Composite Common Subroutine - C0042 * ***************************************************************** * PROGRAM INPUT SPECIFICATIONS AND DATA STRUCTURES * ------------------------------------------------ * * Data Structure to Load Video Screen Text * * * * * * * Copy Member for Composite Common Subroutine - C00SC * ***************************************************************** * * Copy Member for Server - X0005 * ***************************************************************** * * Copy Member for Server - X9800E * ***************************************************************** **************************************************************** * MAINLINE PROGRAM * ---------------- * * Process housekeeping. * * ---- ---- * * If LR on, end program. * * ----- --- * * If automatic inquiry set, process inquiry. * * ----- ---- * * Begin normal program processing. * -------------------------------- * * * If subfile page display not set, set subfile page display. * * * If subfile page empty, don't display SFL page. * * * Write video screen. * * ---- ---- * * Load data field dictionary parameters (one cycle only). * * ----- ---- * * Begin video screen read processing. * * * Se justifica a la izquierda el campo VDRP21 * *---------------------------------------------------------------- * ...Desde $P es de adonde comienzo a pasar a la izquierda *---------------------------------------------------------------- * * If video read timed out, end program. * * ----- --- * ----- --- * * If valid function key pressed, process and return. * * ---- ----- * ----- --- * ----- --- * * Process Selection Exits. * * ---- ----- * --- --- * * Load subfile records. * * ---- ---- * * Return for next input. * * --- --- * * Set correct message in line 24. * * * * --- --- * * END MAINLINE PROGRAM * -------------------- ***************************************************************** * * SUBROUTINE S00EX - Process Function Keys * ---------------------------------------- * * Processing: 1. Process standard function keys. * 2. Process special function key exits. * SR S00EX BEGSR * ----- ----- * * Retain current page of subfile. * * * ------ --- * * If EOJ requested, exit subroutine. * * ----- ------ * * If Display Keys pressed, exit to help facility and return. * ---------------------------------------------------------- * * ---- -------- * * ----- ------ * ---- ------ * * If Cursor Sensitive Help Pressed, exit to CS Help. * -------------------------------------------------- * * ---- -------- | *R PARM ' ' ##CCFF 2 | * | * Para campo de l¡nea se utiliza el pgm P0X205. | * | * ---- ---------- | | * | | * ---- ------ | | * | * Para campo de subgrupo se utiliza el pgm P0X206. | * | * ---- ---------- | | * | | * ---- ------ | | * | * Para campo de de tipo de dato se utiliza UDC | * | * | | * Se cambia c¢digo alfab‚tico por num‚rico | | * | | *R MOVE VDACL0 PSFLDN 6 | | * ---- ------- | | * | | * | | * Se cambia num‚rico a alfab‚tico | | * | | * | | * ---- ----- | | | * | | * ---- ------ | | * | | * * ---- -------- * * ---- ----- * ---- ------ * * If Display errors pressed, exit to error messages. * -------------------------------------------------- * * ---- -------- * ---- ------ * * If HELP key pressed, exit to help facility and return. * ------------------------------------------------------ * * ---- -------- * ---- ------ * * If ROLL UP key pressed, load next 2 pages of subfile. * ----------------------------------------------------- * * ---- ---- * ---- ------ * * If ROLL DOWN key pressed, reset subfile page display. * ----------------------------------------------------- * * ---- ------ * * If Clear Screen pressed, clear screen and return. * ------------------------------------------------- * * ---- ---- * ---- ------ * * If Invalid Function Key, set error and return. * ---------------------------------------------- * * ---- ------ * SR ENDEXE ENDSR ***************************************************************** * * SUBROUTINE S00OP - Process Subfile Selection Exits * -------------------------------------------------- * * Processing: 1. Process changed records. * 2. Process selection exits. * SR S00OP BEGSR * ----- ----- * * Process subfile selection exits. * -------------------------------- * * * Set subfile record read flag ($$SU = *BLANK no record read). * * * If selected option, process all selections. * * ---- ----- * *---------------------------------------------------------------- * * #S01 - Llama al ABC MARCAR ARTóCULOS POR EXCEPCIðN * -------------------------------------------------------- * * * ---- -------- * * * * Monitor for recursive program call * * ---- ------- * ---- ------ * * Monitor for returned record key and description. * * ---- ---------- * * *---------------------------------------------------------------- * * #S02 - Llama al PANTALLA DETALLE ARTóCULO-OT * -------------------------------------------- * * * ---- -------- * * * * Monitor for recursive program call * * ---- ------- * ---- ------ * * Monitor for returned record key and description. * * ---- ---------- * * *---------------------------------------------------------------- * * #S03 - Llama al PANTALLA DETALLE ARTóCULO-OT * -------------------------------------------- * * * ---- ------- * * * * Monitor for recursive program call * * ---- ------- * ---- ------ * * Monitor for returned record key and description. * * ---- ---------- * * *---------------------------------------------------------------- * * #S04 - Llama al ITEM MASTER INFORMATION * --------------------------------------- * * * ---- --------- * * * * Monitor for recursive program call * * ---- ------- * ---- ------ * * Monitor for returned record key and description. * * ---- ---------- * * *---------------------------------------------------------------- * * #S05 - Llama al ITEM MASTER INFORMATION * --------------------------------------- * * * ---- --------- * * * * Monitor for recursive program call * * ---- ------- * ---- ------ * * Monitor for returned record key and description. * * ---- ---------- * * *---------------------------------------------------------------- * * SR END0OP ENDSR ***************************************************************** * * Copy Common Subroutine - Right Justify Numeric Fields * ***************************************************************** * * SUBROUTINE S00VL - Cursor Control Return Values * ----------------------------------------------- * * By format, find the field to update and move in the * returned value. If the format is a subfile, the record * to change is found in @@RRN. * SR S00VL BEGSR * ----- ----- * * * Return values for fields in format V4C292C * * * ---- ------ * * ---- ------ * * ---- ------ * * ---- ------ * * ---- ------ * * ---- ------ * * ---- ------ * * ---- ------ * * ---- ------ * * Return values for fields in format V4C292S * * * * * ---- ------ * ------ --- * * Return values for fields in format V4C2921 * * SR END0VL ENDSR ***************************************************************** * * SUBROUTINE S001 - Clear Fields * ------------------------------ * * Processing: 1. Clear action code only if requested. * 2. Reset all video screen and data file fields * for next transaction. * SR S001 BEGSR * ---- ----- * * Clear action code only if clear screen action. * *---------------------------------------------------------------- *R MOVE *BLANK VDACL0 *R MOVE *BLANK VDITM *R MOVE *BLANK VDUITM *R MOVE *BLANK VDLITM *R MOVE *BLANK VDMCU *R MOVE *BLANK VDNUMB *R MOVE *BLANK VDPRP1 *R MOVE *BLANK VDPRP2 *R MOVE *BLANK VDSRP1 *R MOVE *BLANK VDSRP2 *---------------------------------------------------------------- SR END001 ENDSR **************************************************************** * * SUBROUTINE S003 - Edit Key * -------------------------- * * Processing: 1. Initialize error arrays and subfile. * 2. Load inquiry selection. * 3. Load subfile information. * 4. Monitor for empty subfile. * SR S003 BEGSR * ---- ----- * * Load data field dictionary parameters (one cycle only). * * ----- ---- * * Reset error indicators and arrays. * * * Initialize subfile indexes. * * * Reinitialize subfile display. * * * Si $TEST est  en blanco significa que es el primer ciclo * del programa y no se debe validar el subfile porque todav¡a * no se cargaron datos. * ***************************************************************** * * MCU not equal blanks / Zeros * * * MCU Security Edit. * * * ---- ----- * * ---- ----- * * * * MCU is a valid plant * * ---- ------- * N A D A ***************************************************************** *---------------------------------------------------------------- * * ...En caso de estar valorizado el campo art¡culo, ejecuta * el server X4101 para recuperar el item desde cualquiera * cualquiera de sus tres formas. * * * | * Retrieve Item Master Record | * | * ---- ---------- | * | * ---- ------ | | * | | * Move to screen - Item Number depending upon which one us| | * | | * ---- ------ | | | * | | * ---- ------ | | | * | | | * | | | * | | * | | | * ---- ------ | | | * | | | * | | | * | | * Load descriptions to display fields | | * | | * | | * | * | * | * * Se analiza campo de equipo y se ve en que formato se * captur¢. * *--------------------------------------------------------------- * ---- ------- | *--------------------------------------------------------| | * ...Desde $P es de adonde comienzo a pasar a la izquierda | *--------------------------------------------------------| | * | | * | | * | | * | | * | *---------------------------------------------------------------- * * * Load video input field for - Item Number - Short * * ---- ----- * * Load video input field for - Asset Item Number * * ---- ----- * * Load video input field for - Category Code - Business Unit 21 * *---------------------------------------------------------------- * * Load subfile records. * * ---- ---- *---------------------------------------------------------------- * * Monitor for no subfile records loaded. * *---------------------------------------------------------------- SR END003 ENDSR **************************************************************** * * SUBROUTINE S004 - Load Video Screen Data * ---------------------------------------- * * Processing: 1. Move data base information to video screen. * All video screen fields are alpha and * therefore numeric information must be * processed through subroutine C0014 to set * proper decimals and provide editing for * display on screen. * * Date fields must be converted from their * internal format of month, day and year or * julian to the system format using program * X0028. * SR S004 BEGSR * ---- ----- * * If subfile load completed, skip subroutine. * *---------------------------------------------------------------- * * * Calculations for - Category Code - F/A 10 (Rate Group) · * * * *---------------------------------------------------------------- * * Move to output - Unit or Tag Number * * ---- ------ *---------------------------------------------------------------- * * Move to output - Description 02 * *---------------------------------------------------------------- * * Move to output - Description 05 * *---------------------------------------------------------------- * * Move to output - Description 07 * *---------------------------------------------------------------- * * Move to output - Description 08 * *---------------------------------------------------------------- * * Move to output - Description 15 * * * Se recupera descripci¢n de UDC * * * Se cambia c¢digo alfab‚tico por num‚rico * *R MOVE VDACL0 #UKY * ---- ------- *---------------------------------------------------------------- * * Calculations for - Item Number - Short · * * * *---------------------------------------------------------------- * * Move to output - N£m. Estandar * * ---- ------ *---------------------------------------------------------------- * * Move to output - Business Unit * *R MOVE *BLANK #SINBR *R MOVEL$ERP21 #SINBR *R MOVE T@MCU #DTYP *R MOVE W@MCU #EWRD *R MOVE E@MCU #EC *R MOVE F@MCU #DSPD *R MOVE G@MCU #DATD *R MOVE J@MCU #ALR *R MOVE ' ' #ECOR *R MOVE ' ' #DCOR *R EXSR C00161 * ---- ------ *R #ALR IFEQ 'L' *R MOVEL#SINBR VDMCU *R ELSE *R MOVE #SINBR VDMCU *R END *---------------------------------------------------------------- * * Move to output - Name * Se recupera descripci¢n de UDC * * ---- ------- *---------------------------------------------------------------- * * Calculations for - Asset Item Number · * * * *---------------------------------------------------------------- * * Calculations for - Commodity Class · * * * *---------------------------------------------------------------- * * Calculations for - Commodity Sub Class · * * * *---------------------------------------------------------------- * * Move to output - Category Code - Business Unit 21 * * ---- ------ *---------------------------------------------------------------- * * Calculations for - Sales Catalog Section · * * * *---------------------------------------------------------------- * * Calculations for - Sub Section · * * * *---------------------------------------------------------------- * * Calculations for - Item Number - Unknown Format Entered · * * * *---------------------------------------------------------------- * * Initialize subfile page control and index. * *---------------------------------------------------------------- * * Read master file until end or 1 subfile page filled. * * *---------------------------------------------------------------- * ---- --- *---------------------------------------------------------------- * * Move to work - items , como este campo es num‚rico * se mueve a alfab‚tico para compararlo con el de la * pantalla. * * ---- ------ *---------------------------------------------------------------- * * Move to work - equipos, como este campo es num‚rico * se mueve a alfab‚tico para compararlo con el de la * pantalla. * * ---- ------ *---------------------------------------------------------------- * * Se justifica a la izquierda el campo $NUMB * *---------------------------------------------------------------- * ...Desde $P es de adonde comienzo a pasar a la izquierda *---------------------------------------------------------------- * * Si alguno de los campos de entrada en el subfile de control * no es *, significa que se ha usado como selector en cuyo caso * solo se procesar n aquellos registros que cumplan con la con- * dici¢n de igualdad; en caso contrario se continuar  leyendo * registros hasta encontrar alguno que cumpla con las condiciones * o EOF. * *---------------------------------------------------------------- * * ---- ---- * * ---- ---- * * ---- ---- * * ---- ---- * * ---- ---- * * ---- ---- * * ---- ---- * ---- ---- *---------------------------------------------------------------- * * At end of file, set subfile completion flag and set high * intensity attribute on last subfile record. * * ---- ------ *---------------------------------------------------------------- * * Reset record selection flag ($SEL). * * * Cost Center Security Edit. * * ---- ----- *---------------------------------------------------------------- * * Exit to I/O Window if maximum record count exceeded. * * ---- ------- * ----- ------ * * Update subfile for selected records. * * * * Calculations for - Number Check 2 · * * * *---------------------------------------------------------------- * * Move to output - Number Check 2 · * * ---- ------ *---------------------------------------------------------------- * * Calculations for - Alpha Spec. Data 08 · * * * * * *---------------------------------------------------------------- * * Move to output - Composite Key Block * *---------------------------------------------------------------- * * Move to output - Composite Key Block * *---------------------------------------------------------------- * * Move to output - Composite Key Block * *---------------------------------------------------------------- * * Move to output - Description 01 * *---------------------------------------------------------------- * * Move to output - Description 02 * *---------------------------------------------------------------- * * Move to output - Description 03 * *---------------------------------------------------------------- * * Move to output - Description 02 * *---------------------------------------------------------------- * * Move to output - Description 05 * *---------------------------------------------------------------- * * Move to output - Description 07 * *---------------------------------------------------------------- * * Move to output - Description 08 * *---------------------------------------------------------------- * * Move to output - Description * *---------------------------------------------------------------- * * Move to output - Description * *---------------------------------------------------------------- * * Move to output - Equipment Billing Pattern * *---------------------------------------------------------------- * * Move to output - Alpha - Future * *---------------------------------------------------------------- * * Move to output - Parent (short) Item Number * * ---- ------ *---------------------------------------------------------------- * * Move to output - N£m. Estandar * * ---- ------ *---------------------------------------------------------------- * * Move to output - Commodity Class * * ---- ------ *---------------------------------------------------------------- * * Move to output - Commodity Sub Class * * ---- ------ *---------------------------------------------------------------- * * Move to output - Group - Warehouse Process 2 * * ---- ------ *---------------------------------------------------------------- * * Move to output - Quantity * * ---- ------ *---------------------------------------------------------------- * * Calculations for - Estado de Equipo · * * ---- ------- * *---------------------------------------------------------------- * * Calculations for - Alpha Filler 4 Long 01 · * * * * * *---------------------------------------------------------------- * * Move to output - Sales Catalog Section * * ---- ------ *---------------------------------------------------------------- * * Move to output - Sub Section * * ---- ------ *---------------------------------------------------------------- * * Move to output - Item Status * * ---- ------ *---------------------------------------------------------------- * * Move to output - Quantity Available * * ---- ------ *---------------------------------------------------------------- * * Move to output - Unit of Measure as Input * *---------------------------------------------------------------- * * Move to output - Unit of Measure * *---------------------------------------------------------------- *---------------------------------------------------------------- * * Increment subfile page control and index. * * * If subfile page display not set, set subfile page display. * * * Write subfile record and save current subfile index. * * * If subfile page loaded, drop out of subroutine. * * ----- ------ *---------------------------------------------------------------- SR END004 ENDSR **************************************************************** * * Copy Common Subroutine - Business Unit Security Check * ***************************************************************** * * Copy Common Subroutine - Format Numeric Fields for Output with Ov * ***************************************************************** * * SUBROUTINE S998 - Load dictionary parameters. * ---------------------------------------------- * SR S998 BEGSR * ---- ----- * * * Dictionary parameters for - Century Outfile Created (DSPFLR) * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Number Check 2 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Descripci¢n equipo * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Add (Y/N) * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Alpha Spec. Data 08 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Composite Key Block * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Composite Key Block * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Composite Key Block * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description 01 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description 02 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description 03 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description 02 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description 05 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description 07 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description 08 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description 11 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description 12 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description 13 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Equipment Billing Pattern * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Alpha - Future * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Parent (short) Item Number * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - N£m. Estandar * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Asset Item Number * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Commodity Class * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Commodity Sub Class * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Group - Warehouse Process 2 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Quantity * *R MOVEL'QT2' FRDTAI * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Alpha Filler 4 Long 01 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Selection Exits * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Sales Catalog Section * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Sub Section * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Item Status * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Quantity Available * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Unit of Measure as Input * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Unit of Measure * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Category Code - F/A 10 (Rate Group) * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Unit or Tag Number * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Description 15 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Item Number - Short * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Business Unit * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Name * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Category Code - Business Unit 21 * * ---- ------ *---------------------------------------------------------------- * * Dictionary parameters for - Item Number - Unknown Format Entered * * ---- ------ *---------------------------------------------------------------- * * Set subroutine execution flag. * * SR END998 ENDSR ***************************************************************** * * SUBROUTINE S999 - Housekeeping * ------------------------------- * * Processing: 1. Load video screen text. * 2. Retrieve screen title data area, test * for unauthorized access, center video * title and move to video screen. * 3. Initialize key list. * 4. Load roll keys. * 5. Passed parameters. * 6. Load error message array. * 7. Initialize subfile display. * SR S999 BEGSR * ---- ----- * * Required program parameters. * *---------------------------------------------------------------- * * PSPID Indica el programa que se est  ejecutando. * Este nombre de programa debe cargarse al inicio. * PSVERS Indica la versi¢n del programa a ejecutar. * Esta versi¢n debe cargarse al inicio del programa. * PSRP2 Planta * PSACL0 Tipo de Datos * *---------------------------------------------------------------- * * Initialize PDL variables. * * Se inicializan las variables de entrada del subfile control * con * por default para procesar todos los registros de la * planta. * * * $TEST se utliza para identificar el primer ciclo del programa * *---------------------------------------------------------------- * * Load video screen text. * *---------------------------------------------------------------- * * Retrieve and load all processing options. * * ---- ----- * * Planta * * * Opciones de procesos para ser utilizadas en las llamadas * a otros programas. * * * Opciones de procesos para ser utilizadas en las UDC * *---------------------------------------------------------------- * * Se verifica que las versiones no esten el blanco * si estan en blanco se carga la versi¢n por omisi¢n CMX0001 * * * * * * *---------------------------------------------------------------- * * Test for auto inquiry function. * Se define como un programa de autoconsulta. * * Si no la llamo desde otro RPG no hay autoconsulta | * Else, si la llamo desde otro RPG hay autoconsulta | * | * | * Se cambia num‚rico a alfab‚tico | * | * | * *---------------------------------------------------------------- * * Key list for - Business Unit Security * *---------------------------------------------------------------- * * Key list for - Archivo de Analisis ( Planta, art¡culo) * * * Key list for - Archivo de Desglose de LP - (Planta + Kit + Articu * *---------------------------------------------------------------- * * Key list for - Archivo de Consumos por Equipo * *---------------------------------------------------------------- * * Key list for - Archivo de Consumos por Equipo * *---------------------------------------------------------------- * * Key list for - Archivo de Consumos por Equipo (Planta + Equipo + * *---------------------------------------------------------------- * * Load roll key upper and lower key values. * *---------------------------------------------------------------- * * Load error messages array. * *---------------------------------------------------------------- * * Initialize subfile display. * *---------------------------------------------------------------- * * Retrieve maximum I/O count from User Defined Codes. * * ---- ------- * ---- ----- *---------------------------------------------------------------- * * Load system date. * * ---- ----- *---------------------------------------------------------------- SR END999 ENDSR ***************************************************************** * * Copy Common Subroutine - Retrieve Processing Options * ***************************************************************** * * Copy Common Subroutine - Right adjust alphanumeric field * *****************************************************************