Answered step by step
Verified Expert Solution
Question
1 Approved Answer
not copied else report and your account gonna revoked Explain the action of the following procedure which includes a function procedure within itself. SALES: PROCEDURE
not copied else report and your account gonna revoked
Explain the action of the following procedure which includes a function procedure within itself. SALES: PROCEDURE DCL 1 SALES_FORCE (500); 2 NAME: 3 FIRST_NAME CHAR(10). 3 LAST_NAME CHAR(20). 2 BASE_SALARY FIXED (6.2) 2 PERCENT_COMMISSION FIXED(2,0). A: IF BASE_SALARY(SALESMAN_INDEX)= BASE_SALARY (SALESMAN_ INDEX) THEN GOTOL: EL SE GOTOA SALESMAN_INDEX: PROCEDURE: GET LIST(F_NAME, L_NAME): DO I= 1 TO 500 WHILE (F_NAME (I) - = FIRST_NAME (I) L_NAME (1)-=LAST_NAME (I)): END; IF I>500 THEN DO: PUT LIST (F_NAME|L_NAME.' NOT FOUND') GOTO ERROR; END: RETURN(I): END SALESMAN_INDEX: L: END SALES: Explain the action of the following procedure which includes a function procedure within itself. SALES: PROCEDURE DCL 1 SALES_FORCE (500); 2 NAME: 3 FIRST_NAME CHAR(10). 3 LAST_NAME CHAR(20). 2 BASE_SALARY FIXED (6.2) 2 PERCENT_COMMISSION FIXED(2,0). A: IF BASE_SALARY(SALESMAN_INDEX)= BASE_SALARY (SALESMAN_ INDEX) THEN GOTOL: EL SE GOTOA SALESMAN_INDEX: PROCEDURE: GET LIST(F_NAME, L_NAME): DO I= 1 TO 500 WHILE (F_NAME (I) - = FIRST_NAME (I) L_NAME (1)-=LAST_NAME (I)): END; IF I>500 THEN DO: PUT LIST (F_NAME|L_NAME.' NOT FOUND') GOTO ERROR; END: RETURN(I): END SALESMAN_INDEX: L: END SALESStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started