Pick coders for years have utilize the straight down programming technique. Pick Professionals programmers abandoned this method years ago for the action loop. This entail placing a loop at the top of the program that branches to different sections based on the action required. The main advantage of this pick programming style is better readability and more control over the flow of the program. An example is below:
0001: SUBROUTINE UPDATE.DSC(ORDER.REC,ORDER.NBR) 0002: *----------------------------------------- 0003: * UPDATES THE DAILY-CUST-CODE FILE. 0004: * 0005: * WRITTEN: 9-12-2006 JMH@PPI 0006: * 0007: *----------------------------------------- 0008: * 0009: ACTION = "INIT" 0010: * 0011: LOOP WHILE ACTION # "EOJ" DO 0012: * 0013: BEGIN CASE 0014: * 0015: CASE ACTION = "INIT"; ACTION = "OPEN"; GOSUB A.INIT 0016: CASE ACTION = "OPEN"; ACTION = "READ"; GOSUB A.OPEN 0017: CASE ACTION = "READ"; ACTION = "PROCESS"; GOSUB A.READ 0018: CASE ACTION = "PROCESS"; ACTION = "WRITE"; GOSUB A.PROCESS 0019: CASE ACTION = "WRITE"; ACTION = "EOJ"; GOSUB A.WRITE 0020: CASE 1 ; PRINT "INVALID ACTION"; INPUT ASDF; ACTION = "EOJ" 0021: * 0022: END CASE 0023: * 0024: REPEAT 0025: * 0026: RETURN 0027: *------------------------- 0028: A.INIT: * INIT THE PROGRAM 0029: *------------------------- 0030: *










