ibm midrange - How to add editing and validation rules to CL programming? (As400) -


please note 'expand knowledge' (optional task) college, not assignment

i have physical file called invfile , logical file called invfile1

i have cl program called invcl99

this these columns invfile1

r invfile 1   partdesc   onhand   unitcost   stock   partnum k partnum 

this code cl program

pgm           sndusrmsg msg('executing inventory program, press enter')           chgdta dfupgm(inventorlb/inventory) file(inventorlb/invfile1)  endpgm 

what i'd able do, validate stock column. stands accepts 1 character, or no characters.

i'd validate can accept 1 specific character * or left blank, nothing else can inputted.

i've been googling trying find sources me out this, unfortunately can't find anything. chance can tell me look? or tell me need do?

also, not sure if should create question this, have been trying use numerous ways able input decimals in dfu programs example : total amount purchased 2300.29, i've tried floats caused problems, , i've tried packed decimals, can't seem figure out how allow decimals / periods inputted.

thanks.

the dfu enables specifying column, work fields panel, 2=specify extended definition, 2=change validity checks prompt, @ specify validity checks panel arguments of dds values keyword can specified on list of values prompt if\when relational operator prompt set ls=list of values.

because specifying of values() in database file dds [pf or lf] has no effect outside of provided program generators , dds compiler create display file (crtdspf) [the database cares not designation actual i\o], benefit in having values coded in pf or lf dds ensure both dfu , crtdspf see same input restrictions; pf better choice carry attribute lf , other places. note: dds compiler create printer file (crtprtf) recognizes other keywords, not values, because prtf output-only vs allowing input dspf].

i forget how code dds dspf override inability type period decimal point, seem recall addition of edit code (edtcde) , removal of check keyword keying decimal point possible; ask dfu save dds , review feature generated, , customized version can created , used. other irritating effect dfu forced upper-case; recall dspatr keyword setting can changed. interactive dfu code generator may, ability code limited values, specify capabilities either\both of issues, not recall , cursory did not see anything.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -