How to resolve ISPP330



IBM's Command List programming language & Restructured Extended Executor

How to resolve ISPP330

Postby Sathish_Kumar » Fri Aug 08, 2014 10:25 am

Hi All,

I am doing a code in REXX, the Process of which is to find the count of all the "DSN" string in the given dataset and have to do some manipulations based on it.

In my rexx code, I initialised all the things and when i called a subroutine which has the code like the below

CALL cntstrgs

INSIDE THE SUBROUTINE
cntstrgs:

ADDRESS ISPEXEC view DATSET ('USER.XYZ')
addRESS ISREDIT
" F ALL "dsn" 1 12"
(cnt1) = FIND_COUNTS

BUT WHEN I try to view the dataset like above, it throws an error BDISPMAX and ISPP330.

I searched in the forum to resolve this issue,where few recommended to add some libraries.
And based on that suggestions in the old post, I have added all the ISPPLIB, ISPFLIB etc: but yet it throws the same error.
It would be of great help,if you guys provide your suggestion on the above.
Sathish_Kumar
 
Posts: 4
Joined: Fri Aug 08, 2014 9:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to resolve ISPP330

Postby Pedro » Fri Aug 08, 2014 1:45 pm

ADDRESS ISPEXEC view DATSET ('USER.XYZ')
addRESS ISREDIT
" F ALL "dsn" 1 12"

Your code will not work. The 'VIEW' service passes control to ISPF modules. And your ISREDIT statements will never get executed until VIEW ends. And ISREDIT statements are only valid within a VIEW or EDIT session.

You did not say, but BDISPMAX indicates that you are running the rexx in batch and the problem is that ISPF cannot display a panel in a batch job. It tries repeatedly until it reaches the display max.

What you need to do is invoke VIEW with an initial macro. Move your FIND_COUNTS to your initial macro. Add an END service to your macro so that ISPF does not actually display a panel in batch.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: How to resolve ISPP330

Postby NicC » Fri Aug 08, 2014 2:01 pm

Hey Pedro

Thanks for that info! It is very timely as I was going to have to search the forum soon to get that exact info re VIEW in batch as I will be converting a foreground tool to run in background. Saved me a fight with the search facility!
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: How to resolve ISPP330

Postby Sathish_Kumar » Fri Aug 08, 2014 4:15 pm

Thanks for your inputs Pedro.I tried with a macro now and it worked.

But I have a doubt, does a MACRO has to be always in seperate member or it can be included in the same set of codes from where it is been called.

For example:
1) I have a REXX PGM called CHECKONE where I have the following line

ADDRESS ISPEXEC "view dataset ('USER.XYZ') macro(cntstrgs)" - In this CNTSTRGS is a seperate member containing the macros in the PDS which will be available in SYSPROC.
But is it possible to have this macro inside the same program - CHECKONE inside a subroutine
like below

Inside CHECKONE

address ispexec "view dataset ('USER.XYZ')"
CALL cntstrgs
..
CNTSTRGS:

isredit macro
address isredit
" f all "DSN" 1 12"
.
"END"

I checked like this, and it again ran into the same error ISPP330.
Please let me know your comments on it.
Sathish_Kumar
 
Posts: 4
Joined: Fri Aug 08, 2014 9:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to resolve ISPP330

Postby Pedro » Fri Aug 08, 2014 9:25 pm

But is it possible to have this macro inside the same program?

Maybe you can do it through the use of SUBCOM:
 "SUBCOM isredit"
 IF RC = 1 THEN   
    Call non_editor_code
 ELSE
    Call editor_macro_code   
 Exit

If it is not called as a macro, it runs one piece of code. If it is called as a macro, it runs a different set of code. But I do not see a benefit of keeping them together in one member.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: How to resolve ISPP330

Postby Sathish_Kumar » Sat Aug 16, 2014 5:26 pm

Thanks a lot for your suggestions Pedro and sorry for the late response as I was held up in different things.

We are advised to have less members during our deployment, since Macro takes up one member. we are trying to have a single piece of code to fullfill our requirement rather than going for a Macro.

I have tried your suggestion like below.

ADDRESS TSO
"subcom ISREDIT"
if rc = 1 then
call non-editor-code
else
call editor-macro-code
EXIT

Since my requirement is to find the keyword "DSN" inside the dataset and do some manipulations. I have written the code like this
Inside the function editor-macro-code

editor-macro-code:

address isredit
"view dataset ('user.xyz')"
"f all "DSN" 1 12"
(a1) = find_counts

When i run the above code, the program abends in the line "view dataset' with the return code of RC(20).

So i have changed that line alone as ADDRESS ISPEXEC "view dataset ('user.xyz')" in the function editor-macro-code, but this time
time it abends again with ISPP330 and BDISPMAX.

Could you please let me know how should i proceed from here for my requirement.
Sathish_Kumar
 
Posts: 4
Joined: Fri Aug 08, 2014 9:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to resolve ISPP330

Postby Pedro » Sat Aug 16, 2014 7:35 pm

Of these three statements:
"view dataset ('user.xyz')"
"f all "DSN" 1 12"
(a1) = find_counts

Two of those are editor macro statements and the other is not. My earlier advice was to separate them into two different subroutines, but in your latest snippet of code, you still are combining them in one routine.

We are advised to have less members during our deployment, since Macro takes up one member. we are trying to have a single piece of code to fullfill our requirement rather than going for a Macro.

If you do not have the skill to separate three statements into two subroutines, you will have create two different members regardless of the advice you were given.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: How to resolve ISPP330

Postby prino » Sat Aug 16, 2014 11:17 pm

Sathish_Kumar wrote:We are advised to have less members during our deployment, since Macro takes up one member. we are trying to have a single piece of code to fullfill our requirement rather than going for a Macro.

Using edit macros in production is bad, bad, bad, been there done that.

And which PHB has come up with the imbecile requirement that you should have less members?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 640
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: How to resolve ISPP330

Postby Sathish_Kumar » Mon Aug 18, 2014 6:02 pm

Pedro,

Based on your suggestion I have tried with two subroutines for the non-editor and editor code, but i ended up with the same error. please see below the code and the error I have encountered.

ADDRESS TSO
"SUBCOM ISREDIT"
IF RC = 1 THEN
CALL NON-EDITOR-CODE
ELSE
CALL EDITOR-MACRO-CODE
EXIT

NON-EDITOR-CODE:
ADDRESS ISPEXEC
"VIEW DATASET ('USER.XYZ')"
RETURN

EDITOR-MACRO-CODE:
ADDRESS ISREDIT
"F ALL "MY STRING" 1 30"
(B1) = FIND_COUNTS
RETURN

1) In the non-edior subroutine, the job abends with the same ISPP330 when it executes the line "view dataset", so I am not able to proceed further.

2) In the above code, after executing the line "SUBCOM ISREDIT" the return code is zero and it normally triggers Editor-MACRO-CODE only and it is of no use without opening a dataset in view or edit mode.

Am I moving ahead as per your suggestion??

If you have any samples, please post the same.

And also, if you have any materials on this where I can refer things regarding SUBCOM and the things related to it: Kindly post the same.
Sathish_Kumar
 
Posts: 4
Joined: Fri Aug 08, 2014 9:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to resolve ISPP330

Postby Pedro » Mon Aug 18, 2014 9:27 pm

Repeating:
You did not say, but BDISPMAX indicates that you are running the rexx in batch and the problem is that ISPF cannot display a panel in a batch job. It tries repeatedly until it reaches the display max.

1. What you need to do is invoke VIEW with an initial macro.
2. Move your FIND_COUNTS to your initial macro.
3. Add an END service to your macro so that ISPF does not actually display a panel in batch.

I see #2 in your code. I do not see #1 and #3. #3 is so that you do not actually try to display a panel in batch mode. And #1 is so that you can invoke #2 and #3.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Next

Return to CLIST & REXX