Page 1 of 3

LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 11:58 am
by nikesh_rai
Hi,

I was trying to allocated data id for some data sets using LMINIT, but somehow LMINIT is not being recognized. Can anyone please help me for this.

Here is my code:

XLAYDST = DPFCBPR.UNTE.COPYLIB                           
"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)"                             
"LMINIT DATAID(INDD) DATASET("'DPFCBPR.UNTE.COPYLIB'")"   
SAY 'RC IN : ' RC                                         
"LMINIT DATAID(OUDD) DATASET("'DPFCB.TEMP0001.COPYLIB'")"
SAY 'RC OU : ' RC                                         
"FREE FI(INPUT1 OUPUT1)"                                 


and output is coming:

IKJ56500I COMMAND LMINIT NOT FOUND                                     
    32 *-*  "LMINIT DATAID(INDD) DATASET("'DPFCBPR.UNTE.COPYLIB'")"     
       +++ RC(-3) +++                                                   
RC IN :  -3                                                             
IKJ56500I COMMAND LMINIT NOT FOUND                                     
    34 *-*  "LMINIT DATAID(OUDD) DATASET("'DPFCB.TEMP0001.COPYLIB'")"   
       +++ RC(-3) +++                                                   
RC OU :  -3                                                             
***                                                                     

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 12:44 pm
by NicC
LMINIT is not a TSO command but an ISPF command - the deafult environment for commands is TSO. You have to direct your cammand to ISPF.

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 1:00 pm
by nikesh_rai
Thanks Nicc,

I tried with this code as well..

XLAYDST = DPFCBPR.UNTE.COPYLIB                                   
"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(INDD) DATASET("'DPFCBPR.UNTE.COPYLIB'")" 
SAY 'RC IN : ' RC                                               
"ISPEXEC LMINIT DATAID(OUDD) DATASET("'DPFCB.TEMP0001.COPYLIB'")"
SAY 'RC OU : ' RC                                               
"FREE FI(INPUT1 OUPUT1)"                                         


and still getting error:
ISPF service call not allowed during exit invocation.     
RC IN :  20                                               
ISPF service call not allowed during exit invocation.     
RC OU :  20                                               
***                                                       
                                                         


is there any other way to do the same

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 1:17 pm
by enrico-sorichetti
why not search the forum..
there are gazillions of working snippets posted

and the fact that You did not <understand> the suggestion
You have to direct your cammand to ISPF.


implies that You will have a lot of reading to do
about the environments available at run time and on how to Address a command to the proper one

here
http://publibz.boulder.ibm.com/cgi-bin/ ... s/IKJ4BK90
and here
http://publibz.boulder.ibm.com/cgi-bin/ ... s/ISPZPM70

not the latest but more than enough to get started

You can search for the manuals related to Your level of ISPF starting from
http://www-03.ibm.com/systems/z/os/zos/ ... index.html

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 1:42 pm
by nikesh_rai
Thanks Enrico,

I tried with address command as well, and getting same error

XLAYDST = DPFCBPR.UNTE.COPYLIB                           
"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)"                             
"FREE FI(INPUT1 OUPUT1)"                                 
ADDRESS ISPEXEC "LMINIT DATAID(INDD)",                   
                "DATASET("'DPFCBPR.UNTE.COPYLIB'")"       
SAY 'RC IN : ' RC                                         
ADDRESS ISPEXEC "LMINIT DATAID(OUDD)",                   
                "DATASET("'DPFCB.TEMP0001.COPYLIB'")"     
SAY 'RC OU : ' RC

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 1:53 pm
by enrico-sorichetti
unfortunately You did not post enough info to debug
see here for a working snippet

clist-rexx/topic6538-10.html?hilit=LMINIT

there is a spurious char in the IF statements ( probably a TAB from cut and paste )
but nothing that makes the script unreadable

if You search here using enrico* as user
http://ibmmainframes.com/index.php
You will find many many more snippets

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 5:33 pm
by nikesh_rai
Thanks Enrico and Nicc,

I just wanted to copy a pds member to another pds member, but I don't know why ISPF functions are not working. non of the LMINIT or LMCOPY is being working nither the address ispexec is working here. I have checked with my peers as well. they are also facing same issue. somehow I have checked REXX manual and I got the SMCOPY option and its working fine..

Here is the code:

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)"                             
                                                         
"SMCOPY FDS('"XLAYDSM"')",                               
      "TDS("'TEMP0001.COPYLIB(FLXLWV55)'")",             
      "NOTRANS"                                           
"FREE FI(INPUT1 OUPUT1)"


Thanks
Nikesh

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 6:29 pm
by enrico-sorichetti
might be the case of getting in touch with Your support
there are gazillions of products which use the ISPF dialog facilities

but for such a task why waste time writing a REXX script
and not use the 3.3 ISPF options out of the box

SMCOPY is pretty weird in its behavior so I would not suggest using it for <general> use

it might work, but also it might give odd results ( BTDTGTTS )

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 7:08 pm
by MrSpock
The code, as posted, worked just fine for me. However, just for the record, it will give a return-code of 20 if it's executed in a TSO-only environment, i.e. one where ISPF has not been started.

Re: LMINIT is not being recognized

PostPosted: Tue Feb 05, 2013 7:24 pm
by nikesh_rai
Hi MrSpock,

Can you please post the same code here, I would like to see if its working. Then I will give one more try with your posted code.