Vous êtes sur la page 1sur 3

Pseudo Algorithm and Proposed Logic

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 doesnt have to do any changes to the
code.
1.

FILED_NAME
ORDERABLE_ID
PROGRAM_NUMBER
VRM
SREL
COPYRIGHT
CDROM
DISKETTE
TAPE
ORDER_GRP_NAME
SMC_FEATURE_CODE
MVS_ENVIRONMENT
OS390_ENVIRONMENT
PUMA_ENVIRONMENT
ALT_ORDERABLE
SYST_REPL_REQUIRED
BASE_FEATURE
NLV
NLV_BASE
QPP
WEIGHT
SMPE_INSTALLABLE
XREF_ORDERABLE_ID
LICENSE_TYPE
LAB_LOCATION
PLANNER
ORDERABLE_NAME
COMMENTS
CHANGED_BY
LSP_MMID
ERO_CODE
SPECIAL
BASELESS
PRODUCT_READY

MAXLEN
7
8
8
1
9
3
3
3
7
4
3
3
3
3
3
3
3
7
3
1
3
7
4

ANNOUNCE_DATE
GA_DATE
END_SERVICE_DATE
VALIDATION_STARTED
FIRST_NOSHIP
LAST_NOSHIP
IN_SHIP_STATE
SUPPORT_DONE
RIMS_STARTED
RIMS_DONE
TT_CREATED
TEST_STARTED

10
10
10
10
10
10
10
10
10
10
10
10

FORMAT
Nnnn-ccc
w.rr.mm
Yyyy/yyyyy

7
4
5
1
1

Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy

DATATYPE
AN
N1
N2
C
C1
C
C
C
C
N
C
C
C
C
C
C
C
C
C
C
C
UC/AN
C

C
C
C
C
C

ASTRIC
Y
Y
Y
N
N
N
N
N
Y
Y
N
N
N
N
N
N
Y
Y
N
N
N
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
N
N

D
D
D
D
D
D
D
D
D
D
D
D

N
N
N
N
N
N
N
N
N
N
N
N

VALIDVAL

M,N,C,D
YES,NO
YES,NO
YES,NO

YES,NO
YES,NO
YES,NO
YES,NO
P,S,N
YES,NO

YES,NO
1,2,3
YES,NO

G,P,E,W,O
Y,N
Y,N

BLANK
N
N
N
Y
N
N
N
Y
N
N
Y
Y
Y
Y
Y
Y
N
N
Y
Y
Y
N
N
N
N
N
N
N
N
N
Y
Y
Y

Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y

TEST_DONE
PROD_INV_UPDATED
FIRST_FUNCTIONPAC
LAST_FUNCTIONPAC
FIRST_PDO_SERVICE
FIRST_PDO_PRODUCT
LAST_PDO_PRODUCT
LAST_PDO_SERVICE
FIRST_IPO
LAST_IPO
FIRST_PRODUCTPAC
LAST_PRODUCTPAC
FIRST_SYSTEMPAC
LAST_SYSTEMPAC
MTUX_RESHIPPED
PDO_PRD_RESHIPPED
PPL_DATE
POK_RECEIVED_DATE
DATE_CHANGED
GA_8_FINAL_DATE
PREVAL_SUB_DATE
2.
3.
4.
5.

10
10
7
7
7
7
7
7
7
7
7
7
7
7
7
7
10
10
10
10
10

Mm/dd/yyyy
Mm/dd/yyyy
Yyyy/mm
Yyyy/mm
Yyyy/ww
Yyyy/ww
Yyyy/ww
Yyyy/ww
Yyyy/ww
Yyyy/ww
Yyyy/mm
Yyyy/mm
Yyyy/mm
Yyyy/mm
Yyyy/ww
Yyyy/ww
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy
Mm/dd/yyyy

D
D
D1
D1
D2
D2
D2
D2
D2
D2
D1
D1
D1
D1
D2
D2
D
D
D
D
D

N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N

In the REXX code , read the control file and keep data in a temp array.
Obtain the filed name data from the panel
Run the validity of the field values by calling the procs mention in document below.
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

Y
Y
N
N
N
N
N
N
N
N
N
N
N
N
N
N
Y
Y
Y
Y
Y

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

Vous aimerez peut-être aussi