<< Transact Proglet Example for Music DB >> !sysdic(sysdic.dic) !scope(da,"pw") !version(v) system demo, base=music("MGR",1,1); define(item) http X(10), init=" "; define(item) pathinfo X(20), init=" "; define(item) querystring X(40), init=" "; list http: pathinfo: querystring; set(option) nohead; set(option) width=132; set(option) depth=0; main-loop: data http; if (http) = "GET" then go to handle-get; if (http) = "EXIT" then go to main-exit; display "", line: "

Unsupported method", line: (http): "

", join=0: "", line; go to main-loop; handle-get: data pathinfo; if (pathinfo) = "/composers" then go to list-composers; if (pathinfo) = "/composer" then go to review-composer; display "", line: "MPE Proglet Demo", line: "

Welcome to my Transact Music Proglet

", line: "", line: "
Lars Appel, March 2000
", line: "", line; go to main-loop; list-composers: define(item) id I(10,,4); list id: composername: birthplace: birth: death; display "", line: "MPE Proglet Demo", line: "

MusicDB Composers

", line: "", line; format "", join=0; output(serial) composers, list=(composername: death), recno=id, nohead, nocount; display "
", join=0: (composername), join=0: "", join=0: (birthplace), join=0: "", join=0: (birth), join=0: "", join=0: (death), join=0: "

", line: "
Lars Appel, March 2000
", line: "", line; set(stack) list(querystring); go to main-loop; review-composer: list id; list(auto) composers; data(key) id; display "", line: "MPE Proglet Demo", line: "

MusicDB Composer Detail

", line: "", line; format "", join=0: "", join=0: "", join=0: "", join=0: "", join=0; output(direct) composers, list=(composername: comment), recno=id, nohead; display "
Composername", line: (composername), join=0: "
Birthplace", line: (birthplace), join=0: "
Birth", line: (birth), join=0: "
Death", line: (death), join=0: "
Comment", line: (comment), join=0: "

", line: "
Lars Appel, March 2000
", line: "", line; set(stack) list(querystring); go to main-loop; main-exit: exit; end demo; << Example URL is http://your.host/servlet/tranxl/menu >>