4
Pseudo Algorithm and Proposed Logic 1. Create a new separate file as control file and keep the below data details. The file format should be as below with the fileds as COLS 01- 30 = FILED_NAME COLS 31 = MAXLEN COLS32-42 = FORMAT COLS43-50 = DATATYPE COLS51 = ASTRIC COLS52-62 = VALIDVAL COLS 63 = BLANKSTAT Advantage of this method is allows on the fly change to the control file and doesn’t have to do any changes to the code. FILED_NAME MAXLEN FORMAT DATATYPE ASTRIC VALIDVAL BLANK ORDERABLE_ID 7 AN Y N PROGRAM_NUMBER 8 Nnnn-ccc N 1 Y N VRM 8 w.rr.mm N2 Y N SREL 1 C N M,N,C,D Y COPYRIGHT 9 Yyyy/ yyyyy C1 N N CDROM 3 C N YES,NO N DISKETTE 3 C N YES,NO N TAPE 3 C N YES,NO Y ORDER_GRP_NAME 7 C Y N SMC_FEATURE_CODE 4 N Y N MVS_ENVIRONMENT 3 C N YES,NO Y OS390_ENVIRONMENT 3 C N YES,NO Y PUMA_ENVIRONMENT 3 C N YES,NO Y ALT_ORDERABLE 3 C N YES,NO Y SYST_REPL_REQUIRED 3 C N P,S,N Y BASE_FEATURE 3 C N YES,NO Y NLV 3 C Y N NLV_BASE 7 C Y N QPP 3 C N YES,NO Y WEIGHT 1 C N 1,2,3 Y SMPE_INSTALLABLE 3 C N YES,NO Y XREF_ORDERABLE_ID 7 UC/AN Y N LICENSE_TYPE 4 C Y N LAB_LOCATION Y N PLANNER Y N ORDERABLE_NAME Y N COMMENTS Y N CHANGED_BY Y N LSP_MMID 7 C Y N ERO_CODE 4 C Y N SPECIAL 5 C N G,P,E,W, O Y BASELESS 1 C N Y,N Y PRODUCT_READY 1 C N Y,N Y

Pseudo Algorithm and Proposed Logic

Embed Size (px)

Citation preview

Page 1: Pseudo Algorithm and Proposed Logic

Pseudo Algorithm and Proposed Logic1. Create a new separate file as control file and keep the below data details. The file format should be as below

with the fileds as COLS 01-30 = FILED_NAME COLS 31 = MAXLEN COLS32-42 = FORMAT COLS43-50 = DATATYPE COLS51 = ASTRIC COLS52-62 = VALIDVAL COLS 63 = BLANKSTATAdvantage of this method is allows on the fly change to the control file and doesn’t have to do any changes to the code.

FILED_NAME MAXLEN FORMAT DATATYPE ASTRIC VALIDVAL BLANKORDERABLE_ID 7 AN Y NPROGRAM_NUMBER 8 Nnnn-ccc N 1 Y NVRM 8 w.rr.mm N2 Y NSREL 1 C N M,N,C,D YCOPYRIGHT 9 Yyyy/yyyyy C1 N NCDROM 3 C N YES,NO NDISKETTE 3 C N YES,NO NTAPE 3 C N YES,NO YORDER_GRP_NAME 7 C Y NSMC_FEATURE_CODE 4 N Y NMVS_ENVIRONMENT 3 C N YES,NO YOS390_ENVIRONMENT 3 C N YES,NO YPUMA_ENVIRONMENT 3 C N YES,NO YALT_ORDERABLE 3 C N YES,NO YSYST_REPL_REQUIRED 3 C N P,S,N YBASE_FEATURE 3 C N YES,NO YNLV 3 C Y NNLV_BASE 7 C Y NQPP 3 C N YES,NO YWEIGHT 1 C N 1,2,3 YSMPE_INSTALLABLE 3 C N YES,NO YXREF_ORDERABLE_ID 7 UC/AN Y NLICENSE_TYPE 4 C Y NLAB_LOCATION Y NPLANNER Y NORDERABLE_NAME Y NCOMMENTS Y NCHANGED_BY Y NLSP_MMID 7 C Y NERO_CODE 4 C Y NSPECIAL 5 C N G,P,E,W,O YBASELESS 1 C N Y,N YPRODUCT_READY 1 C N Y,N Y

ANNOUNCE_DATE 10 Mm/dd/yyyy D N YGA_DATE 10 Mm/dd/yyyy D N YEND_SERVICE_DATE 10 Mm/dd/yyyy D N YVALIDATION_STARTED 10 Mm/dd/yyyy D N YFIRST_NOSHIP 10 Mm/dd/yyyy D N YLAST_NOSHIP 10 Mm/dd/yyyy D N YIN_SHIP_STATE 10 Mm/dd/yyyy D N YSUPPORT_DONE 10 Mm/dd/yyyy D N YRIMS_STARTED 10 Mm/dd/yyyy D N YRIMS_DONE 10 Mm/dd/yyyy D N YTT_CREATED 10 Mm/dd/yyyy D N YTEST_STARTED 10 Mm/dd/yyyy D N Y

Page 2: Pseudo Algorithm and Proposed Logic

TEST_DONE 10 Mm/dd/yyyy D N YPROD_INV_UPDATED 10 Mm/dd/yyyy D N YFIRST_FUNCTIONPAC 7 Yyyy/mm D1 N NLAST_FUNCTIONPAC 7 Yyyy/mm D1 N NFIRST_PDO_SERVICE 7 Yyyy/ww D2 N NFIRST_PDO_PRODUCT 7 Yyyy/ww D2 N NLAST_PDO_PRODUCT 7 Yyyy/ww D2 N NLAST_PDO_SERVICE 7 Yyyy/ww D2 N NFIRST_IPO 7 Yyyy/ww D2 N NLAST_IPO 7 Yyyy/ww D2 N NFIRST_PRODUCTPAC 7 Yyyy/mm D1 N NLAST_PRODUCTPAC 7 Yyyy/mm D1 N NFIRST_SYSTEMPAC 7 Yyyy/mm D1 N NLAST_SYSTEMPAC 7 Yyyy/mm D1 N NMTUX_RESHIPPED 7 Yyyy/ww D2 N NPDO_PRD_RESHIPPED 7 Yyyy/ww D2 N NPPL_DATE 10 Mm/dd/yyyy D N YPOK_RECEIVED_DATE 10 Mm/dd/yyyy D N YDATE_CHANGED 10 Mm/dd/yyyy D N YGA_8_FINAL_DATE 10 Mm/dd/yyyy D N YPREVAL_SUB_DATE 10 Mm/dd/yyyy D N Y

2. In the REXX code , read the control file and keep data in a temp array.3. Obtain the filed name data from the panel 4. Run the validity of the field values by calling the procs mention in document below.5. Based on the values returned from the procs display error message if required.

Sample procedure as below

mxlen: procedure; arg mxl, definied_mxl if definied_mxl >= length(mxl) then return 1

datype: procedure; arg datype , definied_datype, opt_datype if opt_datype = 'D' then call date_format_validation if opt_datype = 'D1' then call date_format_val1 for yyyy/mm if opt_datype = 'D2' then call date_format_Val2 for yyyy/ww if definied_datype =DATATYPE(datype,opt_datype) then return 1

{ DATATYPE for numeric = NUM DATATYPE for character = CHAR DATATYPE for Aplhanumeric check = 1 DATATYPE for Upper case check = 1

Validvalues: procedure; arg validval , defined_val if matches return 1

astric_check: procedure; arg astric, defined_astric if defined_astric = Y then bypass if defined_astric = N then check if '*' exists in the string using verify

Page 3: Pseudo Algorithm and Proposed Logic

return appropiatly

Format_check: N1 - should have first four numeric and then next three UC or Numeric N2 - should have all numeric but dot must exist in 2nd, 4th position C1 - should have slash symbol at 5th position and all characters only

If the field name entered doesnt belong to any of the field name mentioned above display message

“PPD032 – Invalid field , field name not in orderable table”

If the validation check is successful Msg_code can be set as “PPD000 – Successful validation”