View previous topic :: View next topic |
Author |
Message |
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Sun Aug 22, 2004 3:47 am Post subject: Problems invoking SORT via REXX (ONLINE) |
|
|
I was trying to invoke SORT via REXX (Using ADDRESS LINKMVS SORT). It works absolutely fine but if in case I give a wrong input file, the SORT routine abends and I get a screen full of messages regarding the abend. I
don't want to display these messages on screen. I want to capture the return code/abend code via rexx and display a user friendly message in a panel.
I tried the following but none of them worked.
1. tried using OUTTRAP before invoking SORT.
2. Used CONTROL ERRORS RETURN
3. Allocated the DDNAME - SYSABEND & SYSUDUMP to DUMMY
Please guide me,
Thanks,
Phantom |
|
Back to top |
|
|
Frank Yaeger Sort Forum Moderator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Sun Aug 22, 2004 9:30 am Post subject: |
|
|
For DFSORT, if you're abending because your site has changed the ERET=RC16 installation default to ERET=ABEND, and DFSORT is issuing an error message (ICExxxA) for the "wrong input file", then you can change the error message to a RC=16 by using a DFSPARM data set (RECFM=FB, LRECL=80) with:
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Aug 24, 2004 10:54 am Post subject: |
|
|
Thanks for the clarification Frank.
unfortunately all we have here is syncsort
This is the abend message that I'm getting. (when I give a wrong file name - which does not exist)
Code: |
User abend code 0016, reason code 00000016.
Abend in host command SORT or address environment routine LINKMVS.
IEA995I SYMPTOM DUMP OUTPUT
USER COMPLETION CODE=0016
TIME=11.36.51 SEQ=34710 CPU=0000 ASID=00E8
PSW AT TIME OF ERROR 078D2000 000CBFD4 ILC 2 INTC 0D
NO ACTIVE MODULE FOUND
NAME=UNKNOWN
DATA AT PSW 000CBFCE - CB86181F 0A0D5810 D1C45010
AR/GR 0: 009FB01F/00000000 1: 00000000/00000010
2: 00000000/00078030 3: 00000000/00000000
4: 00000000/000CF266 5: 00000000/000CD146
6: 00000000/000CD18D 7: 00000000/00000000
8: 00000000/000CD18C 9: 00000000/000CBAD8
A: 00000000/00000000 B: 00000000/000CC408
C: 00000000/000CB408 D: 00000000/00079000
E: 00000000/800CBEE0 F: 00000000/00000010
END OF SYMPTOM DUMP
155 *-* ADDRESS LINKMVS SORT
+++ RC(16) +++
|
I can check the existence of the file using SYSDSN, but this is just an example. I'm just trying to simulate a practical situation. I am just trying to capture the abend message when SORT abends for whatever reason.
I tried giving "SIGNAL ON FAILURE NAME failrtn", The Control goes to the "failrtn" and displays the custom error message that I gave. But my message is displayed just below the Abend message provided above. I'm unable to stop the system message from appearing on the screen.
Finally I tried the one shown below
Code: |
ADDRESS TSO 'PROFILE NOWTPMSG
|
This time the error message is displayed as
Code: |
User abend code 0016, reason code 00000016.
Abend in host command SORT or address environment routine LINKMVS.
155 *-* ADDRESS LINKMVS SORT
+++ RC(16) +++
FAILED : MY CUSTOM ERROR MESSAGE....
|
I still get 2 lines of error message. The last line is due to the SIGNAL command.
Could someone please guide me...
Thanks a lot,
Phantom |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Aug 24, 2004 11:06 am Post subject: |
|
|
Phantom,
Try allocating sysout( usually the sort messages go to sysout) within the rexx exec and use OUTTRAP to capture the error mesages. Outtrap should be able to capture all the messages except for the TPUT-messages.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Aug 24, 2004 11:24 am Post subject: |
|
|
Kolusu,
This is the piece of code that I'm trying to execute... I allocated sysout to dummy and also used OUTTRAP...
Code: |
"ISREDIT MACRO"
SIGNAL ON FAILURE NAME FAILRTN;
"ISPEXEC CONTROL ERRORS RETURN"
......
CALL MSG('OFF')
"FREE FI(SYSOUT SORTIN SORTOUT SYSIN)"
"ALLOC FI(SORTIN) DA('"OFFTABLE"') SHR REUSE"
"ALLOC FI(SYSOUT) DUMMY"
/* * * * * * * * * * * * * * * * * * */
/* ALLOCATE A FILE FOR SYSIN AND */
/* WRITE THE SORTCARD INTO IT. */
/* * * * * * * * * * * * * * * * * * */
SCARD = " ALLOC FI(SYSIN) DA(&&T1) REUSE"
CALL BPXWDYN(SCARD)
"EXECIO "OUT.0" DISKW SYSIN (STEM OUT. FINIS"
/* * * * * * * * * * * * * * * * * * */
/* ALLOCATE A FILE FOR SORTOUT TO */
/* CAPTURE THE OUTPUT OF SORT */
/* * * * * * * * * * * * * * * * * * */
SCARD = " ALLOC FI(SORTOUT) DA(&&T2) REUSE"
CALL BPXWDYN(SCARD)
/* * * * * * * * * * * * * * * * * * */
/* CALL SORT PROGRAM USING THE */
/* DYNAMICALLY BUILD SORT CARD */
/* * * * * * * * * * * * * * * * * * */
ADDRESS TSO 'PROFILE NOWTPMSG'
CALL OUTTRAP 'STE.'
ADDRESS LINKMVS SORT
CALL MSG('ON')
"EXECIO * DISKR SORTOUT (FINIS STEM IN."
"FREE FI(SYSOUT SORTIN SORTOUT SYSIN)"
RETURN RC
.......
FAILRTN:
SAY 'FAILED....'
EXIT 0
RETURN
|
I still get the error message (4 lines) displayed on the screen.
Code: |
User abend code 0016, reason code 00000016.
Abend in host command SORT or address environment routine LINKMVS.
157 *-* ADDRESS LINKMVS SORT
+++ RC(16) +++
FAILED....
***
|
Thanks,
Phantom |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Aug 24, 2004 11:59 am Post subject: |
|
|
Phantom,
Try allocating the sysout as follows.
Code: |
"ALLOC F(SYSOUT) DUMMY SHR REUSE"
|
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Aug 24, 2004 12:09 pm Post subject: |
|
|
Hi Kolusu,
I tried your suggestion, but this didnot work either....Same result...
Thanks,
Phantom |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Aug 24, 2004 12:23 pm Post subject: |
|
|
Phantom,
I don't think the messages you have shown are from sysout. may be it is your sysprint/SYSTSPRT DD's that is throwing that error message? you can also try this
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Wed Aug 25, 2004 10:59 am Post subject: |
|
|
Kolusu,
TSO PROFILE NOWTPMSG is already available in my code above. I also tried to allocate SYSPRINT & SYSTSPRT DDs to DUMMY (SHR REUSE). Still I get 4 lines of error message.
If I don't provide NOWTPMSG then I get a screen full of error message, But when I code that statement I get only the last 4 lines of error message.
Code: |
User abend code 0016, reason code 00000016.
Abend in host command SORT or address environment routine LINKMVS.
157 *-* ADDRESS LINKMVS SORT
+++ RC(16) +++
|
Thanks,
Phantom |
|
Back to top |
|
|
|
|