View previous topic :: View next topic
|
Author |
Message |
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
Hi all,
I am getting ISRE771 error for the below code in line 41 for
Code: |
000001 /****REXX***/
000002 trace r
000003 indd1='testr.temp1'
000004 address tso
000005 "alloc f(indd1) da('"strip(indd1)"') shr reuse"
000006 address tso
000007 "execio * diskr indd1 (stem var1. finis)"
000008 if var1.0=0 then
000009 do
000010 empty1='Y'
000011 end
000012 address tso
000013 "free f(indd1)"
000014 dsnname2= 'testr.file1.TXT'
000015 DSNNAME3= 'testr.RESULT'
000016 dsorg = listdsi("'"dsnname2"'")
000017 lreclname=syslrecl
000018 y = sysdsn("'"dsnname3"'")
000019 if y = 'OK' then
000020 do
000021 address tso
000022 "delete '"dsnname3"'"
000023 address tso
000024 "alloc fi(outf) da('"dsnname3"') sp(10,5)",
000025 "cylinders dsorg(ps) recfm(f b) lrecl("lreclname")",
000026 "unit(sysda) new release"
000027 end
000028 else
000029 do
000030 address tso
000031 "alloc fi(outf) da('"dsnname3"') sp(10,5)",
000032 "cylinders dsorg(ps) recfm(f b) lrecl("lreclname")",
000033 "unit(sysda) new release"
000034 end
000035 DO I=1 TO VAR1.0
000036 DSNPOS=POS('DSN=',VAR1.i)
000037 SPOS=DSNPOS + 4
000038 GDGPOS=POS('(+1)',VAR1.i)
000039 epos=gdgpos - spos
000040 FNDSTR=SUBSTR(VAR1.I,SPOS,EPOS)
000041 address ispexec
000042 "ISREDIT MACRO NOPROCESS"
000043 rc = 0
000044 address ispexec
000045 "isredit x all"
000046 "isredit f all "fndstr" "
000047 "isredit (cnt1) = find_counts"
000048 IF CNT1 > 0 THEN
000049 DO
000050 address tso
000051 "ALLOC F(INDD3) DA('"STRIP(DSNNAME3)"') MOD REUSE"
000052 TOTAL_RECS= 'FILE - "'FNDSTR'" AVAILABLE'
000053 out.0 = 1
000054 out.1=total_recs
000055 address tso
000056 "execio" out.0 "diskw indd3 (stem out. finis"
000057 END
000058 END
000059 return
|
when using trace r
Code: |
3 *-* indd1='TESTR.temp1'
>>> "TESTR.temp1"
4 *-* address tso
5 *-* "alloc f(indd1) da('"strip(indd1)"') shr reuse"
>>> "alloc f(indd1) da('TESTR.temp1') shr reuse"
6 *-* address tso
7 *-* "execio * DESkr indd1 (stem var1. finis)"
>>> "execio * DESkr indd1 (stem var1. finis)"
8 *-* if var1.0=0
>>> "0"
12 *-* address tso
13 *-* "free f(indd1)"
>>> "free f(indd1)"
14 *-* dsnname2= 'TESTR.FILE1.TXT'
>>> "TESTR.FILE1.TXT"
15 *-* DSNNAME3= 'TESTR.FINAL.RESULT'
>>> "TESTR.FINAL.RESULT"
16 *-* dsorg = listdsi("'"dsnname2"'")
>>> "0"
17 *-* lreclname=syslrecl
>>> "141"
18 *-* y = sysdsn("'"dsnname3"'")
>>> "DATASET NOT FOUND"
19 *-* if y = 'OK'
>>> "0"
28 *-* else
29 *-* do
30 *-* address tso
31 *-* "alloc fi(outf) da('"dsnname3"') sp(10,5)","cylinders dsorg(ps) re
cfm(f b) lrecl("lreclname")","unit(sysda) new release"
>>> "alloc fi(outf) da('TESTR.FINAL.RESULT') sp(10,5) cylinders dsorg(
ps) recfm(f b) lrecl(141) unit(sysda) new release"
34 *-* end
35 *-* DO I=1 TO VAR1.0
>>> "1"
>>> "625"
36 *-* DSNPOS=POS('DSN=',VAR1.i)
>>> "38"
37 *-* SPOS=DSNPOS + 4
>>> "42"
38 *-* GDGPOS=POS('(+1)',VAR1.i)
>>> "69"
39 *-* epos=gdgpos - spos
>>> "27"
40 *-* FNDSTR=SUBSTR(VAR1.I,SPOS,EPOS)
>>> "PRDT.NBPD.DES3309A.PARMFILE"
41 *-* address ispexec
42 *-* "ISREDIT MACRO NOPROCESS"
>>> "ISREDIT MACRO NOPROCESS"
43 *-* rc = 0
>>> "0"
44 *-* address ispexec
45 *-* "isredit x all"
>>> "isredit x all"
46 *-* "isredit f all "fndstr" "
>>> "isredit f all PRDT.NBPD.DES3309A.PARMFILE "
47 *-* "isredit (cnt1) = find_counts"
>>> "isredit (cnt1) = find_counts"
48 *-* IF CNT1 > 0
>>> "1"
*-* THEN
49 *-* DO
50 *-* address tso
51 *-* "ALLOC F(INDD3) DA('"STRIP(DSNNAME3)"') MOD REUSE"
>>> "ALLOC F(INDD3) DA('TESTR.FINAL.RESULT') MOD REUSE"
52 *-* TOTAL_RECS= 'FILE - "'FNDSTR'" AVAILABLE'
>>> "FILE - "PRDT.NBPD.DES3309A.PARMFILE" AVAILABLE"
53 *-* out.0 = 1
>>> "1"
54 *-* out.1=total_recs
>>> "FILE - "PRDT.NBPD.DES3309A.PARMFILE" AVAILABLE"
55 *-* address tso
56 *-* "execio" out.0 "DESkw indd3 (stem out. finis"
>>> "execio 1 DESkw indd3 (stem out. finis"
57 *-* END
58 *-* END
35 *-* DO I=1 TO VAR1.0
36 *-* DSNPOS=POS('DSN=',VAR1.i)
>>> "38"
37 *-* SPOS=DSNPOS + 4
>>> "42"
38 *-* GDGPOS=POS('(+1)',VAR1.i)
>>> "75"
39 *-* epos=gdgpos - spos
>>> "33"
40 *-* FNDSTR=SUBSTR(VAR1.I,SPOS,EPOS)
>>> "PRDT.NBPD.DES3309A.ST0005.RFORMAT"
41 *-* address ispexec
42 *-* "ISREDIT MACRO NOPROCESS"
>>> "ISREDIT MACRO NOPROCESS"
|
I got the error
Code: |
******************************************************************************
* *
* Command in error . : MACRO NOPROCESS *
* *
* Too many parameters *
* The edit primary MACRO command allows no parameters. *
* *
* Error message ID . : ISRE771 *
* *
* Last return code . : 20 *
* *
* Macro executing . : GDGIMP2 *
* *
* Press ENTER key to terminate the macro. *
* *
* *
* *
******************************************************************************
|
The macro will be executed after extracting fndstr from testr.temp1 and applied on the open dataset where the error ISRE771 is obtained for second iteration of I=2. Could you please help to resolve this issue.
Thanks,
Murali |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
1 - your error is not at line 41 but at line 42
2 - your error message clearly shows the problem.
3 - I am not going to read through your code, or the manual. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
You can have the "ISREDIT MACRO NOPROCESS" only once. Put it a beginning of your program.
And I prefer to use the following format:
Address Isredit "MACRO NOPROCESS (PRM)"
Address Isredit "(ds)=dataset"
but each to his/her own as long as it works. |
|
Back to top |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
Thanks willy. It worked.
Only in line no 21, i am getting warning message like 'The file is in use not able to allocate'.
Code: |
address tso
000022 "delete '"dsnname3"'"
000023 address tso
000024 "alloc fi(outf) da('"dsnname3"') sp(10,5)",
000025 "cylinders dsorg(ps) recfm(f b) lrecl("lreclname")",
000026 "unit(sysda) new release" |
Is there any way to suppress the warning information messages like outtrap. I tried outtrap it doesnt worked |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
I don't see a FREE for that dataset in your program. Try the TSO ISRDDN command to check if you still have it allocated. If not, then somebody else have it. |
|
Back to top |
|
|
hankoerlemans
New User
Joined: 25 Jan 2018 Posts: 62 Location: Australia
|
|
|
|
Outtrap only fails for me when I code it wrong
Code: |
x = OUTTRAP("msg.")
"LISTC LVL('IDIRFRHQ')"
x = OUTTRAP("OFF.")
do i=0 to msg.0
** do something **
end
|
|
|
Back to top |
|
|
|