- Article Type: General
- Product: Aleph
- Product Version: 20
Question related to the custom input form: How can the custom form be configured to check for user input in required fields, and prevent the job from being submitted until the fields are filled in?
Aleph jobs like p_manage_21 check for the presence of the input file, and for the output filename and don't allow the process to run until both are filled in correctly. I want to do the same for a custom service we're developing, but haven't found validation elements in p-manage-21.xml or documentation that describes how that functionality is enabled.
The reason that p_manage_21 requires the input file to be present is that the ./butil/b_manage_21_check_param.cbl program calls the b_check_file_name routine with the data the user has input as the value:
MOVE 100 TO L.
CALL "len_count" USING
CALL "pic_to_lower" USING
CALL "b_check_file_name" USING
The third line in the CALL "b_check_file_name" (Y") is the SW-MANDATORY parameter/value.
In your case you should find that the make_param_files proc (using ./copy/P_CUST_nn.source as input) has generated a ./butil/b_cust_nn.cbl program. You could add a section of code like the above, with the following lines appended:
IF BUF-ERROR NOT = 0
CALL "add_error" USING
Then recompile with "iprou butil b_cust_nn" and restart the pc_server.
- Article last edited: 10/8/2013