/* REXX MBTI Myers-Briggs Type Indicator test administration vehicle |**-***-***-***-***-***-***-***-***-***-***-***-***-***-***-***-**| | | | WARNING: EMBEDDED COMPONENTS. | | See text following TOOLKIT_INIT | | | |**-***-***-***-***-***-***-***-***-***-***-***-***-***-***-***-**| Written by Frank Clarke Impact Analysis . SYSPROC TRAPOUT Modification History ccyymmdd xxx ..... .... */ arg argline address TSO /* REXXSKEL ver.19991109 */ arg parms "((" opts signal on syntax signal on novalue call TOOLKIT_INIT /* conventional start-up -*/ rc = trace(tv) info = parms /* to enable parsing */ call A_INIT /* -*/ call B_QUES /* -*/ call C_ANALYZE /* -*/ exit /*@ MBTI */ /* . ----------------------------------------------------------------- */ A_INIT: /*@ */ a_tv = trace() /* what setting at entry ? */ if branch then call BRANCH address TSO parse value "" with, base. parta. partb. key. parse value "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" with, idx . call DEIMBED /* -*/ "NEWSTACK" "EXECIO * DISKR" $ddn.Q "(FINIS" do queued() idx = idx + 1 parse pull base "" parta "" partb base.idx = Strip(base) parta.idx = Strip(parta) partb.idx = Strip(partb) end rc = Trace("O"); rc = trace(a_tv) "EXECIO * DISKR" $ddn.KEY "(FINIS" pull key.a pull key.b do queued() pull end "DELSTACK" return /*@ A_INIT */ /* . ----------------------------------------------------------------- */ B_QUES: /*@ */ if branch then call BRANCH address TSO parse value "" with, astring name parse value "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" with, ct. . /* say "Enter your lastname, firstname" pull name; name = strip(name) if name = "EXIT" then return */ do bx = 1 to idx do forever "CLEAR" say " " say " " say Center("Question" bx "of" idx,79) say " " say " " say base.bx say " (a)" parta.bx say " (b)" partb.bx say " " "NEWSTACK"; pull key; "DELSTACK" if Pos(key,"aAbB") > 0 then leave if Pos(key,"xX") > 0 then exit end /* forever */ if Pos(key,"aA") > 0 then do /* A */ tag = Substr(key.a,bx,1) astring = astring"A" end else do /* B */ tag = Substr(key.b,bx,1) astring = astring"B" end ct.tag = ct.tag + 1 end /* bx */ return /*@ B_QUES */ /* . ----------------------------------------------------------------- */ C_ANALYZE: /*@ */ c_tv = trace() /* what setting at entry ? */ if branch then call BRANCH address TSO factor = 1 /* How many profiles? */ /* E or I ? */ if ct.E > ct.I then type = "E" else if ct.E < ct.I then type = "I" else do; type = type"*"; factor = factor*2; end /* S or N ? */ if ct.S > ct.N then type = type"S" else if ct.S < ct.N then type = type"N" else do; type = type"*"; factor = factor*2; end /* T or F ? */ if ct.T > ct.F then type = type"T" else if ct.T < ct.F then type = type"F" else do; type = type"*"; factor = factor*2; end /* J or P ? */ if ct.J > ct.P then type = type"J" else if ct.J < ct.P then type = type"P" else do; type = type"*"; factor = factor*2; end "CLEAR" ctslug = "E="ct.e "I="ct.i "S="ct.s "N="ct.n "T="ct.t "F="ct.f "J="ct.j "P="ct.p say " " say " " say "Your MBTI type is" type say " "ctslug say " " hikey = Translate(type,"ff"x,"*") lokey = Translate(type,"00"x,"*") ok2print = "0" rc = Trace("O"); rc = trace(c_tv) "EXECIO * DISKR" $ddn.PROF "(FINIS" do queued() parse pull line if line = "" then do; ok2print = "0"; iterate; end if ok2print then do; say line; iterate; end tag = Left(line,4) if tag = "" then iterate if BITAND(tag,hikey) = BITOR(tag,lokey) then do ok2print = "1" say " " factor = factor - 1 if factor > 0 then, if factor//2 = 0 then do; "NEWSTACK"; pull; "DELSTACK"; end say line iterate end end /* queued */ /* profslug = name "" astring "" ctslug logfn = "A:\MBTILOG" call OPEN logfn,"a" call WRITE logfn,profslug,"NL" call CLOSE logfn */ return /*@ C_ANALYZE */ /* Parse out the embedded components at the back of the source code. This is a very early version of DEIMBED and is custom-fitted to this application. It should NOT be replaced for normal maintenance. . ----------------------------------------------------------------- */ DEIMBED: Procedure expose, /*@ */ (tk_globalvars) ddnlist $ddn. daid. imb_tv = trace() /* what setting at entry ? */ address TSO fbpo.0 = "NEW UNIT(VIO) SPACE(5 5) TRACKS DIR(40)", "RECFM(F B) LRECL(80) BLKSIZE(0)" vbps.0 = "NEW UNIT(VIO) SPACE(5 5) TRACKS", "RECFM(V B) LRECL(150) BLKSIZE(0)" parse value "" with ddnlist $ddn. daid. lastln = sourceline() currln = lastln /* */ if Left(sourceline(currln),2) <> "*/" then return currln = currln - 1 /* previous line */ "NEWSTACK" address ISPEXEC do while sourceline(currln) <> "/*" text = sourceline(currln) /* save with a short name ! */ if Left(text,3) = ")))" then do /* package the queue */ rc = Trace("O"); rc = trace(imb_tv) upper text parse var text ")))" ddn mbr . /* PLIB PANL001 maybe */ if mbr = "" then do /* sequential data */ ddnlist = ddnlist ddn /* keep track */ $ddn = ddn || Random(999) $ddn.ddn = $ddn address TSO "ALLOC FI("$ddn")" vbps.0 address TSO "EXECIO" queued() "DISKW" $ddn "(FINIS" end /* mbr is empty */ else do /* partitioned */ if Pos(ddn,ddnlist) = 0 then do /* doesn't exist */ ddnlist = ddnlist ddn /* keep track */ $ddn = ddn || Random(999) $ddn.ddn = $ddn address TSO "ALLOC FI("$ddn")" fbpo.0 "LMINIT DATAID(DAID) DDNAME("$ddn")" daid.ddn = daid end daid = daid.ddn "LMOPEN DATAID("daid") OPTION(OUTPUT)" do queued() parse pull line "LMPUT DATAID("daid") MODE(INVAR) DATALOC(LINE) DATALEN(80)" end rc = Trace("O"); rc = trace(imb_tv) "LMMADD DATAID("daid") MEMBER("mbr")" "LMCLOSE DATAID("daid")" end /* partitioned */ end /* package the queue */ else push text /* onto the top of the stack */ currln = currln - 1 /* previous line */ end /* while */ address TSO "DELSTACK" return /*@ DEIMBED */ /* This is how to setup the LIBDEFs */ dd = "" do Words(ddnlist) /* each LIBDEF DD */ parse value ddnlist dd with dd ddnlist $ddn = $ddn.dd /* PLIB322 <- PLIB */ "LIBDEF ISP"dd "LIBRARY ID("$ddn") STACK" end /* . ----------------------------------------------------------------- */ LOCAL_PREINIT: /*@ customize opts */ address TSO return /*@ LOCAL_PREINIT */ /* . ----------------------------------------------------------------- */ HELP: /*@ */ address TSO;"CLEAR" if helpmsg <> "" then do ; say helpmsg; say ""; end ex_nam = Left(exec_name,8) /* predictable size */ say " "ex_nam" is the famous Myers-Briggs Type Indicator. It purports to" say " determine your 'personality type' by analyzing the answers" say " to 70 binary opinions of yourself. " say " " say " Syntax: "ex_nam" " "NEWSTACK" ; pull ; "CLEAR" ; "DELSTACK" say " Debugging tools provided include: " say " " say " BRANCH: show all paragraph entries. " say " " say " TRACE tv: will use value following TRACE to place the execution in" say " REXX TRACE Mode. " say " " say " " say " Debugging tools can be accessed in the following manner: " say " " say " TSO "ex_nam" parameters (( debug-options " say " " say " For example: " say " " say " TSO "ex_nam" (( BRANCH TRACE ?R " address ISPEXEC "CONTROL DISPLAY REFRESH" exit /*@ HELP */ /* . ----------------------------------------------------------------- */ BRANCH: Procedure expose, /*@ */ sigl exec_name rc = trace("O") /* we do not want to see this */ arg brparm . origin = sigl /* where was I called from ? */ do currln = origin to 1 by -1 /* inch backward to label */ if Right(Word(Sourceline(currln),1),1) = ":" then do parse value sourceline(currln) with pgfname ":" . /* Label */ leave ; end /* name */ end /* currln */ select when brparm = "NAME" then return(pgfname) /* Return full name */ when brparm = "ID" then do /* wants the prefix */ parse var pgfname pgfpref "_" . /* get the prefix */ return(pgfpref) end /* brparm = "ID" */ otherwise say left(sigl,6) left(pgfname,40) exec_name "Time:" time("L") end /* select */ return /*@ BRANCH */ /* . ----------------------------------------------------------------- */ DUMP_QUEUE: /*@ Take whatever is in stack */ rc = trace("O") /* and write to the screen */ address TSO "QSTACK" /* how many stacks? */ stk2dump = rc - tk_init_stacks /* remaining stacks */ if stk2dump = 0 & queued() = 0 then return say "Total Stacks" rc , /* rc = #of stacks */ "Begin Stacks" tk_init_stacks , /* Stacks present at start */ "Stacks to DUMP" stk2dump do dd = rc to tk_init_stacks by -1 /* empty each one. */ say "Processing Stack #" dd "Total Lines:" queued() do queued();pull line;say line;end /* pump to the screen */ "DELSTACK" /* remove stack */ end /* dd = 1 to rc */ return /*@ DUMP_QUEUE */ /* . ----------------------------------------------------------------- */ KEYWD: Procedure expose info /*@ hide all vars, except info*/ arg kw kw_pos = wordpos(kw,info) /* find where it is, maybe */ if kw_pos = 0 then return "" /* send back a null, not found*/ kw_val = word(info,kw_pos+1) /* get the next word */ info = Delword(info,kw_pos,2) /* remove both */ return kw_val /*@ KEYWD */ /* . ----------------------------------------------------------------- */ KEYPHRS: Procedure expose, /*@ */ info helpmsg exec_name /* except these three */ arg kp wp = wordpos(kp,info) /* where is it? */ if wp = 0 then return "" /* not found */ front = subword(info,1,wp-1) /* everything before kp */ back = subword(info,wp+1) /* everything after kp */ parse var back dlm back /* 1st token must be 2 bytes */ if length(dlm) <> 2 then /* Must be two bytes */ helpmsg = helpmsg "Invalid length for delimiter("dlm") with KEYPHRS("kp")" if wordpos(dlm,back) = 0 then /* search for ending delimiter*/ helpmsg = helpmsg "No matching second delimiter("dlm") with KEYPHRS("kp")" if helpmsg <> "" then call HELP /* Something is wrong */ parse var back kpval (dlm) back /* get everything b/w delim */ info = front back /* restore remainder */ return Strip(kpval) /*@ KEYPHRS */ /* . ----------------------------------------------------------------- */ NOVALUE: /*@ */ say exec_name "raised NOVALUE at line" sigl say " " say "The referenced variable is" condition("D") say " " zsigl = sigl signal SHOW_SOURCE /*@ NOVALUE */ /* . ----------------------------------------------------------------- */ SHOW_SOURCE: /*@ */ call DUMP_QUEUE /* Spill contents of stacks -*/ if sourceline() <> "0" then /* to screen */ say sourceline(zsigl) rc = trace("?R") nop exit /*@ SHOW_SOURCE */ /* . ----------------------------------------------------------------- */ SS: Procedure /*@ Show Source */ arg ssbeg ssend . if ssend = "" then ssend = 10 if \datatype(ssbeg,"W") | \datatype(ssend,"W") then return ssend = ssbeg + ssend do ssii = ssbeg to ssend ; say sourceline(ssii) ; end return /*@ SS */ /* . ----------------------------------------------------------------- */ SWITCH: Procedure expose info /*@ */ arg kw sw_val = Wordpos(kw,info) > 0 /* exists = 1; not found = 0 */ if sw_val then /* exists */ info = Delword(info,Wordpos(kw,info),1) /* remove it */ return sw_val /*@ SWITCH */ /* . ----------------------------------------------------------------- */ SYNTAX: /*@ */ errormsg = exec_name "encountered REXX error" rc "in line" sigl":", errortext(rc) say errormsg zsigl = sigl signal SHOW_SOURCE /*@ SYNTAX */ /* Can call TRAPOUT. . ----------------------------------------------------------------- */ TOOLKIT_INIT: /*@ */ address TSO info = Strip(opts,"T",")") /* clip trailing paren */ parse source sys_id how_invokt exec_name DD_nm DS_nm, as_invokt cmd_env addr_spc usr_tokn parse value "" with tv helpmsg . parse value 0 "ISR00000 YES" "Error-Press PF1" with, sw. zerrhm zerralrm zerrsm if SWITCH("TRAPOUT") then do "TRAPOUT" exec_name parms "(( TRACE R" info exit end /* trapout */ if Word(parms,1) = "?" then call HELP /* I won't be back */ "QSTACK" ; tk_init_stacks = rc /* How many stacks? */ parse value SWITCH("BRANCH") SWITCH("MONITOR") SWITCH("NOUPDT") with, branch monitor noupdt . parse value mvsvar("SYSNAME") sysvar("SYSNODE") with, #tk_cpu node . sw.nested = sysvar("SYSNEST") = "YES" sw.batch = sysvar("SYSENV") = "BACK" sw.inispf = sysvar("SYSISPF") = "ACTIVE" parse value KEYWD("TRACE") "O" with tv . tk_globalvars = "tk_globalvars exec_name tv helpmsg sw. zerrhm", "zerralrm zerrsm zerrlm tk_init_stacks branch", "monitor noupdt" call LOCAL_PREINIT /* for more opts -*/ return /*@ TOOLKIT_INIT */ /* )))q At a party, do you interact with many, including strangers interact with a few known to you Are you more realistic than speculative speculative than realistic Is it worse to have your head in the clouds be in a rut Are you more impressed by principles emotions Are you more drawn toward the convincing touching Do you prefer to work to deadlines just 'whenever' Do you tend to choose rather carefully somewhat impulsively At parties, do you stay late, with increasing energy leave early, with decreased energy Are you more attracted to sensible people imaginative people Are you more interested in what is actual what is possible In judging others, are you more swayed by laws than circumstances circumstances than laws In approaching others, is your inclination to be somewhat objective personal Are you more punctual leisurely Does it bother you more having things incomplete completed In you social groups do you keep abreast of others' happenings get behind on the news In doing ordinary things are you more likely to do it the usual way do it your own way Writers should say what they mean and mean what they say express things more by use of analogy Which appeals to you more consistency of thought harmonious human relationships Are you more comfortable in making logical judgements value judgements Do you want things settled and decided unsettled and undecided Would you say you are more serious and determined easy-going In phoning, do you rarely question that it will all be said rehearse what you'll say Facts speak for themselves illustrate principles Are visionaries somewhat annoying rather fascinating Are you more often a cool-headed person a warm-hearted person Is it worse to be unjust merciless Should one usually let events occur by careful selection and choice randomly and by chance Do you feel better about having purchased having the option to buy In company do you initiate conversation wait to be approached Common sense is rarely questionable frequently questionable Children often do not make themselves useful enough exercise their fantasy enough In making decisions do you feel more comfortable with standards feelings Are you more firm than gentle gentle than firm Which is more admirable the ability to organize and be methodical the ability to adapt and make do Do you put more value on the definite open-ended Does new and non-routine interaction with others stimulate and energize you tax your reserves Are you more frequently a practical sort of person a fanciful sort of person Are you more likely to see how others are useful see how others see Which is more satisfying to discuss an issue thoroughly to arrive at agreement on an issue Which rules you more: your head your heart Are you more comfortable with work that is contracted done on a casual basis Do you tend to look for the orderly whatever turns up Do you prefer many friends with brief contact a few friends with more lengthy contact Do you go more by facts principles Are you more interested in production and distribution design and research Which is more of a compliment "There is a very logical person" "There is a very sentimental person" Do you value in yourself more that you are unwavering devoted Do you more often prefer the final and unalterable statement tentative and preliminary statement Are you more comfortable after a decision before a decision Do you speak easily and at length with strangers find little to say to strangers Are you more likely to trust your experience hunch Do you feel more practical than ingenious more ingenious than practical Which person is more to be complimented: one of clear reason strong feeling Are you inclined more to be fair-minded sympathetic Is it preferable mostly to make sure things are arranged just let things happen In relationships, should most things be renegotiable random and circumstantial When the phone rings, do you hasten to get it first hope someone else will answer Do you prize more in yourself a strong sense of reality a vivid imagination Are you drawn more to fundamentals overtones Which seems the greater error to be too passionate to be too objective Do you see yourself as basically hard-headed soft-hearted Which situation appeals to you more the structured and scheduled the unstructured and unscheduled Are you a person that is more routinized than whimsical whimsical than routinized Are you more inclined to be easy to approach somewhat reserved In writings do you prefer the more literal the more figurative Is it harder for you to identify with others utilize others Which do you wish more for yourself: clarity of reason strength of compassion Which is the greater fault: being indiscriminate being critical Do you prefer the planned event unplanned event Do you tend to be more deliberate than spontaneous spontaneous than deliberate )))key ESTJSTJESTJSTJESTJSTJESTJSTJESTJSTJESTJSTJESTJSTJESTJSTJESTJSTJESTJSTJ INFPNFPINFPNFPINFPNFPINFPNFPINFPNFPINFPNFPINFPNFPINFPNFPINFPNFPINFPNFP )))prof ISTJ Serious, quiet, earn success by concentration and thoroughness. Practical, orderly, matter-of-fact, logical, realistic, and dependable. See to it that everything is well organized. Take responsibility. Make up their own minds as to what should be accomplished and work toward it steadily, regardless of protests or distractions. ISFJ Quiet, friendly, responsible, and conscientious. Work devotedly to meet their obligations. Lend stability to any project or group. Thorough, painstaking, accurate. May need time to master technical subjects, as their interests are not usually technical. Patient with detail and routine. Loyal, considerate, concerned with how other people feel. INFJ Succeed by perserverance, originality, and desire to do whatever is needed or wanted. Put their best efforts into their work. Quietly forceful, conscientious, concerned for others. Respected for their firm principles. Likely to be honored and followed for their clear convictions as to how best to serve the common good. INTJ Usually have original minds and great drive for their own ideas and purposes. In fields that appeal to them, they have a fine power to organize a job and carry it through with or without help. Skeptical, critical, independent, determined, often stubborn. Must learn to yield less important points in order to win the most important. ISTP Cool onlookers -- quiet, reserved, observing and analyzing life with detached curiosity and unexpected flashes of original humor. Usually interested in impersonal principles, cause and effect, how and why mechanical things work. Exert themselves no more than they think necessary, because any waste of energy would be inefficient. ISFP Retiring, quiet, friendly, sensitive, kind, modest about their abilities. Shun disagreements, do not force their opinions or values on others. Usually do not care to lead but are often loyal followers. Often relaxed about getting things done, because they enjoy the present moment and do not want to spoil it by undue haste or exertion. INFP Full of enthusiasms and loyalties, but seldom talk of these until they know you well. Care about learning, ideas, language, and independent projects of their own. Tend to undertake too much, then somehow get it done. Friendly, but often too absorbed in what they are doing to be sociable. Little concerned with possessions or physical surroundings. INTP Quiet, reserved, impersonal. Enjoy especially theoretical or scientific subjects. Logical to the point of hair-splitting. Usually interested mainly in ideas, with little liking for parties or small talk. Tend to have sharply defined interests. Need careers where some strong interest can be used and useful. ESTP Matter-of-fact, do not worry or hurry, enjoy whatever comes along. Tend to like mechanical things and sports, with friends on the side. May be a bit blunt or insensitive. Adaptable, tolerant, generally conservative in values. Dislike long explanations. Are best with real things that can be handled, taken apart, or put together. ESFP Outgoing, easygoing, accepting, friendly, enjoy everything and make things more fun for others by their enjoyment. Like sports and making things. Know what's going on and join in eagerly. Find remembering facts easier than mastering theories. Are best in situations that need sound common sense and practical ability with people as well as things. ENFP Warmly enthusiastic, high-spirited, ingenious, imaginative. Able to do almost anything that interests them. Quick with a solution for any difficulty and ready to help anyone with a problem. Often rely on their ability to improvise instead of preparing in advance. Can usually find compelling reasons for whatever they want. ENTP Quick, ingenious, good at many things. Stimulating company, alert and outspoken. May argue for fun on either side of a question. Resourceful in solving new and challenging problems, but may neglect routine assignments. Apt to turn to one new interest after another. Skillful in finding logical reasons for whatever they want. ESTJ Practical, realistic, matter-of-fact, with a natural head for business or mechanics. Not interested in subjects they see no use for, but can apply themselves when necessary. Like to organize and run activities. May make good administrators, especially if they remember to consider others' feelings and points of view. ESFJ Warm-hearted, talkative, popular, conscientious, born cooperators, active committee members. Need harmony and may be good at creating it. Always doing something nice for someone. Work best with encouragement and praise. Little interest in abstract thinking or technical subjects. Main interest is in things that directly and visibly affect people's lives. ENFJ Responsive and responsible. Generally feel real concern for what others think or want, and try to handle things with due regard for other person's feelings. Can present a proposal or lead a group discussion with ease and tact. Sociable. popular, sympathetic. Responsive to praise and criticism. ENTJ Hearty frank, decisive, leaders in activities. usually good in anything that requires reasoning and intelligent talk, such as public speaking. Are usually well-informed and enjoy adding to their fund of knowledge. May sometimes be more positive and confident than their experience in an area warrants. */