Page 2 of 3

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 7:57 pm
by enrico-sorichetti
did You notice that MrSpok said
The code, as posted,

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 8:21 pm
by MrSpock
Using the code:

/* REXX */                                                         
Trace I                                                           
"ALLOC FI(OUPUT1) DA("TEMP0001.COPYLIB")",                         
       "NEW RECFM(F B) DIR(10) LRECL(80) BLKSIZE(80)" ,           
       "TRACKS SPACE(10,10)"                                       
"ISPEXEC LMINIT DATAID(OUDD) DATASET("TEMP0001.COPYLIB")"         
SAY 'RC OU : ' RC                                                 
"FREE FI(OUPUT1)"                                                 


I get these results:

     3 *-* "ALLOC FI(OUPUT1) DA("TEMP0001.COPYLIB")","NEW RECFM(F B) DIR(10) LR
ECL(80) BLKSIZE(80)" ,"TRACKS SPACE(10,10)"                                       
       >L>   "ALLOC FI(OUPUT1) DA("                                               
       >L>   "TEMP0001.COPYLIB"                                                   
       >O>   "ALLOC FI(OUPUT1) DA(TEMP0001.COPYLIB"                               
       >L>   ")"                                                                 
       >O>   "ALLOC FI(OUPUT1) DA(TEMP0001.COPYLIB)"                             
       >L>   "NEW RECFM(F B) DIR(10) LRECL(80) BLKSIZE(80)"                       
       >O>   "ALLOC FI(OUPUT1) DA(TEMP0001.COPYLIB) NEW RECFM(F B) DIR(10) LREC
L(80) BLKSIZE(80)"                                                               
       >L>   "TRACKS SPACE(10,10)"                                               
       >O>   "ALLOC FI(OUPUT1) DA(TEMP0001.COPYLIB) NEW RECFM(F B) DIR(10) LREC
L(80) BLKSIZE(80) TRACKS SPACE(10,10)"                                           
     6 *-* "ISPEXEC LMINIT DATAID(OUDD) DATASET("TEMP0001.COPYLIB")"             
       >L>   "ISPEXEC LMINIT DATAID(OUDD) DATASET("                               
       >L>   "TEMP0001.COPYLIB"                                                   
       >O>   "ISPEXEC LMINIT DATAID(OUDD) DATASET(TEMP0001.COPYLIB"               
       >L>   ")"                                                                 
       >O>   "ISPEXEC LMINIT DATAID(OUDD) DATASET(TEMP0001.COPYLIB)"             
     7 *-* SAY 'RC OU : ' RC                                                     
       >L>   "RC OU : "                                                           
       >V>   "0"                                                                 
       >O>   "RC OU :  0"                                                         
RC OU :  0                                   
     8 *-* "FREE FI(OUPUT1)"                 
       >L>   "FREE FI(OUPUT1)"               

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 9:51 pm
by Pedro
ISPF service call not allowed during exit invocation.   

I am curious about what environment you were trying to execute it from. My guess is you tried to run it as a panel exit.

Please use MSGID ON to see error message numbers. It is easier to look it up in the messages and codes manual. Or if this was displayed in the ISPF error panel, the message id is shown in the lines preceding what you posted.

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 11:21 pm
by nikesh_rai
Hi Pedro and MrSpoc,

I have tried the same code:

TRACE I
XLAYDST = DPFCBPR.UNTE.COPYLIB                               
XLAYDSM = "DPFCBPR.UNTE.COPYLIB(FLXLWV55)"                   
"ALLOC FI(INPUT1) DA('"XLAYDST"') SHR REUSE"                 
"ALLOC FI(OUPUT1) DA("'TEMP0001.COPYLIB'")",                 
       "NEW RECFM(F,B) DIR(10) LRECL(80) BLKSIZE(80)" ,       
       "TRACKS SPACE(10,10)"                                 
"ISPEXEC LMINIT DATAID(OUDD) DATASET("'TEMP0001.COPYLIB'")"   
SAY 'RC OU : ' RC                                             
SAY 'RC TXT : ' ERRORTEXT(RC)                                 
"FREE FI(INPUT1 OUPUT1)"                                     


This REXX is being called from a panel,
and strange... :) still getting the error

    27 *-*  XLAYDST = DPFCBPR.UNTE.COPYLIB                               
       >L>    "DPFCBPR.UNTE.COPYLIB"                                     
    28 *-*  XLAYDSM = "DPFCBPR.UNTE.COPYLIB(FLXLWV55)"                   
       >L>    "DPFCBPR.UNTE.COPYLIB(FLXLWV55)"                           
    29 *-*  "ALLOC FI(INPUT1) DA('"XLAYDST"') SHR REUSE"                 
       >L>    "ALLOC FI(INPUT1) DA('"                                   
       >V>    "DPFCBPR.UNTE.COPYLIB"                                     
       >O>    "ALLOC FI(INPUT1) DA('DPFCBPR.UNTE.COPYLIB"               
       >L>    "') SHR REUSE"                                             
       >O>    "ALLOC FI(INPUT1) DA('DPFCBPR.UNTE.COPYLIB') SHR REUSE"   
    30 *-*  "ALLOC FI(OUPUT1) DA("'TEMP0001.COPYLIB'")",                 
            "NEW RECFM(F,B) DIR(10) LRECL(80) BLKSIZE(80)" ,             
     "TRACKS SPACE(10,10)"                                               
       >L>    "ALLOC FI(OUPUT1) DA("                                     
       >L>    "TEMP0001.COPYLIB"                                         
       >O>    "ALLOC FI(OUPUT1) DA(TEMP0001.COPYLIB"                     
       >L>    ")"                                                       
       >O>    "ALLOC FI(OUPUT1) DA(TEMP0001.COPYLIB)"                   
       >L>    "NEW RECFM(F,B) DIR(10) LRECL(80) BLKSIZE(80)"             
       >O>    "ALLOC FI(OUPUT1) DA(TEMP0001.COPYLIB) NEW RECFM(F,B) DIR(10) LRE
CL(80) BLKSIZE(80)"                                                           
       >L>    "TRACKS SPACE(10,10)"                                           
       >O>    "ALLOC FI(OUPUT1) DA(TEMP0001.COPYLIB) NEW RECFM(F,B) DIR(10) LRE
CL(80) BLKSIZE(80) TRACKS SPACE(10,10)"                                       
    33 *-*  "ISPEXEC LMINIT DATAID(OUDD) DATASET("'TEMP0001.COPYLIB'")"       
       >L>    "ISPEXEC LMINIT DATAID(OUDD) DATASET("                           
       >L>    "TEMP0001.COPYLIB"                                               
       >O>    "ISPEXEC LMINIT DATAID(OUDD) DATASET(TEMP0001.COPYLIB"           
       >L>    ")"                                                             
       >O>    "ISPEXEC LMINIT DATAID(OUDD) DATASET(TEMP0001.COPYLIB)"         
ISPF service call not allowed during exit invocation.                         
       +++ RC(20) +++                                                         
    34 *-*  SAY 'RC OU : ' RC                                                 
       >L>    "RC OU : "                                                       
       >V>    "20"                                                             
       >O>    "RC OU :  20"                                                   
RC OU :  20                                                                   
    35 *-*  SAY 'RC TXT : ' ERRORTEXT(RC)                                     
       >L>    "RC TXT : "                                                     
       >V>    "20"                                                             
       >F>    "Symbol expected"                                               
       >O>    "RC TXT :  Symbol expected"                                     
RC TXT :  Symbol expected                         
    36 *-*  "FREE FI(INPUT1 OUPUT1)"             
       >L>    "FREE FI(INPUT1 OUPUT1)"           
    37 *-*  return                               


Please GOD help me... :D

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 11:36 pm
by Akatsukami
nikesh_rai wrote:This REXX is being called from a panel

And what do you suppose a "panel exit" is, kusomushi, save Rexx that is executed in an ISPF panel? Doesn't that make the significance of "ISPF service call not allowed during exit invocation" clear to you?

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 11:42 pm
by nikesh_rai
Hi Akatsukami,

I don't have enough handson on REXX. Its only 6-7 month I have started learning REXX. Can you please help me how it can be done.. since the REXX is being called from a panel.. is there any other option for the same... :)

Re: LMINIT is not being recognized

PostPosted: Wed Feb 06, 2013 12:32 am
by Akatsukami
You can't use any ISPF service -- anything that you would precede with address ispexec -- in a panel exit -- Rexx that is embedded in or invoked from an ISPF panel.

Dr. Sorichetti has suggested that you use the standard ISPF option 3.3 -- the move/copy utility. If all that you are trying to do is copying one data set or member to another, I endorse this suggestion. If you are trying to more, explain what you are trying to achieve, so that we may offer suggestion that do not require the impossible.

Re: LMINIT is not being recognized

PostPosted: Wed Feb 06, 2013 2:06 am
by enrico-sorichetti
the information posted is not enough for us to spend time trying to recreate Your problem

post ...
the PANEL definition
the REXX script

use the code tags

Re: LMINIT is not being recognized

PostPosted: Wed Feb 06, 2013 3:27 am
by enrico-sorichetti
I see that You are using the ERRORTEXT function ...
it is pretty useless in this context, ERRORTEXT display the text for errors related to <internal> errors ( SYNTAX and friends )
see here for a discussion of it
http://ibmmainframes.com/about56335.html

Re: LMINIT is not being recognized

PostPosted: Wed Feb 06, 2013 3:39 am
by Pedro
is there any other option for the same


1. start a rexx program
2. from rexx, display the panel
3. when user presses Enter, the panel ends and control returns to rexx.
4. from rexx, do your other service calls.

That is, do not start with a panel to call rexx.