On Thu, 14 Apr 2011 10:29:16 -0500, McKown, John <john.mck...@healthmarkets.com> wrote:
>Thanks for that. It's been a while since I looked at the books. Now to >convince the maintainers of CICS, ftp, telnet, ssh, ... to use that and >display the returned messages appropriately. The last time I checked (many years ago) CICS was not interested in getting the message back because they need to provide a message in the user's chosen language, so they preferred to retrieve the information themselves and format it in their own message. > >The book mentions SAFPMSAD. The book defines that as: "When control >returns from RACROUTE, the RACROUTE parameter-list field is mapped by >SAFPMSAD in the ICHSAFP mapping macro. SAFPMSAD is nonzero if messages >have been returned. This field contains the address of an area that >consists of two fullwords followed by the message itself in write- >to-operator (WTO) parameter-list format. The first word is the length of >the area including the two-fullword header; the second word points to the >next message area, if there is one, or contains zero if no more messages >areas exist." > >I am, as always, a bit uncertain how to intepret this. I would guess: >SAFPMSAD points to an area: word 1 contains the length of the entire area. >word 2 points to ?what?. The next area, if any. >Then a WTO type parameter list. My intepretation says I'd process this something like: > > LT 5,SAFPMSAD > JZ ELOOP >LOOP DS 0H > L R6,4(,R5) POINT TO NEXT AREA > LA R1,8(,R5) POINT TO WTO PARM LIST > send MF=(E,(1)) SEND A MESSAGE TO THE USER VIA A MACRO OF SOME SORT > L R0,0(,R5) GET LENGTH > LR R1,R5 POINT TO AREA > STORAGE RELEASE, > LENGTH=(0), > SP=SUBPOOL, > ADDR=(1) > LTR R5,R6 > JNZ LOOP >ELOOP DS 0H > Something like that :) Of course, don't forget that you'd need to free each area; your sample code frees only the first one. -- Walt Farrell IBM STSM, z/OS Security Design