Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
LMINIT problem - not finding DDNAME

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Danielle.Filteau

New User


Joined: 02 Dec 2014
Posts: 16
Location: Canada

PostPosted: Tue Sep 19, 2017 9:57 pm    Post subject: LMINIT problem - not finding DDNAME
Reply with quote

Hi,
LMINIT keeps giving me RC=20 because it is not recognizing the DDNAME on the LMINIT statement. I have tried everything I can think of! I don't want to hardcode the PDS name in the rexx, I want it to do this operation on whatever dataset in in the INDD DDNAME in the jcl.

Code:

//TSOB      EXEC PGM=IKJEFT01,PARM='STATUPD'
//SYSEXEC   DD DISP=SHR,DSN=SYSP.NDVR.DANI.REX
//INDD      DD DISP=SHR,DSN=SXSC.NDVR.DANI.CALDEL
//SYSTSPRT  DD SYSOUT=*
//SYSTSIN   DD DUMMY
/*


Code:

TRACE R   /* TAKE OUT COMMENTS TO SET TRACE ON FOR DEBUGGING */

"ISPEXEC LMINIT DATAID(TMPCIN) DDNAME('"INDD"') ENQ(SHR)"
 IF RC=0 THEN
 DO
"ISPEXEC LMOPEN DATAID("TMPCIN") OPTION(INPUT)"
 IF RC=0 THEN
 DO

MEMBER=" "                      /* POSITION AT TOP OF MEMBER LIST */
DO WHILE RC=0
   MEMBER = STRIP(MEMBER)
   "ISPEXEC LMMLIST DATAID("TMPCIN") OPTION(LIST) MEMBER("MEMBER")" ,
           "STATS(YES)"
   IF RC¬=0 THEN LEAVE
   IF "ZLMDATE" = " " THEN
   DO
   SAY MEMBER "ZLCDATE" "ZLMDATE" "ZLMTIME"
   "ISPEXEC LMMSTATS DATAID("TMPCIN") MEMBER("MEMBER") " || ,
            "CREATED4() MODDATE4() MODTIME() USER()"
   SAY MEMBER "ZLCDATE" "ZLMDATE" "ZLMTIME"
   END
END

"ISPEXEC LMMLIST DATAID("TMPCIN") OPTION(FREE)"
"ISPEXEC LMFREE DATAID(TMPCIN)"
END
END




Code:

1    30 *-* "ISPEXEC LMINIT DATAID(TMPCIN) DDNAME('"INDD"') ENQ(SHR)"
        >>>   "ISPEXEC LMINIT DATAID(TMPCIN) DDNAME('INDD') ENQ(SHR)"
        +++ RC(20) +++
     31 *-* IF RC=0
        >>>   "0"
 READY
 END


I'm new to REXX coding, and have now spent the better part of 2 days reading manuals and looking at code snippets but no matter what that DDNAME is not being picked up. What is missing???? I've tried &INDD, '"INDD"', 'INDD', "INDD", yada yada but nothing resolves.

I wrote this one as a starting point for several more REXX that have to be created. I have a number of PDS where the members were created without statistics - need to set the stats so that a later job can go in and delete members that were created more than 30 days ago.

Any help would be appreciated. We're at z/OS 2.2.

Thanks!
Back to top
View user's profile Send private message

daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 683
Location: Pennsylvania

PostPosted: Tue Sep 19, 2017 10:31 pm    Post subject:
Reply with quote

I know you tried several variations, but did you try:

Code:
"ISPEXEC LMINIT DATAID(TMPCIN) DDNAME(INDD) ENQ(SHR)"


That is the simplest of variations.
Back to top
View user's profile Send private message
Danielle.Filteau

New User


Joined: 02 Dec 2014
Posts: 16
Location: Canada

PostPosted: Tue Sep 19, 2017 11:01 pm    Post subject:
Reply with quote

yes. That doesn't work either.

Code:

1    30 *-* "ISPEXEC LMINIT DATAID(TMPCIN) DDNAME(INDD) ENQ(SHR)"
        >>>   "ISPEXEC LMINIT DATAID(TMPCIN) DDNAME(INDD) ENQ(SHR)"
        +++ RC(20) +++
     31 *-* IF RC=0
        >>>   "0"
     57 *-*  /*"ALLOC DDNAME(INDD) SHR REUSE"*/
 READY
 END
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 683
Location: Pennsylvania

PostPosted: Tue Sep 19, 2017 11:23 pm    Post subject:
Reply with quote

I know the problem.

You are just running TSO (IKJEFT01).

You are trying to issue ISPF commands (ISPEXEC).

You need to start ISPF and run your program.

You should check with your system programmer to get the proper DD allocations for ISPF at your site. There will be several.

The syntax in the JCL would look like this. Also you probably want to use IKJEFT1B instead on IKJEFT01.

Code:
//SYSTSIN    DD *
 PROFILE NOPREFIX
 ISPSTART CMD(%STATUPD)
/*
Back to top
View user's profile Send private message
Danielle.Filteau

New User


Joined: 02 Dec 2014
Posts: 16
Location: Canada

PostPosted: Tue Sep 19, 2017 11:35 pm    Post subject:
Reply with quote

ahhh that does look familiar ! I have jcl for that, just didn't put two and two together.

thanks! I'll give it a try.
Back to top
View user's profile Send private message
Danielle.Filteau

New User


Joined: 02 Dec 2014
Posts: 16
Location: Canada

PostPosted: Wed Sep 20, 2017 12:29 am    Post subject:
Reply with quote

Well, maybe a bit of progress but it's still not working. Should I not see INDD replaced by SXSC.NDVR.DANI.CALDEL ? Based on other inhouse rexx the quotes look right but apparently I don't know anything. lol

Code:

//UPDATE   EXEC PGM=IKJEFT01
//*        INCLUDE MEMBER=SYNDVRR#
//SYSEXEC  DD DISP=SHR,DSN=SYSP.NDVR.DANI.REX
//         DD DISP=SHR,DSN=SYS1.ISP.SISPEXEC
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//ISPLOG   DD DUMMY
//ISPPROF  DD RECFM=FB,LRECL=80,SPACE=(TRK,(5,5,5))
//ISPCTL1  DD RECFM=FB,LRECL=80,SPACE=(TRK,5)
//*
//INDD     DD DISP=SHR,DSN=SXSC.NDVR.DANI.CALDEL
//*
//SYSTSIN  DD *
 PROFILE NOPREFIX
 ISPSTART CMD(STATUPD)
//*
//*------- ISPF DATASETS -------*
//ISPSLIB  DD DISP=SHR,DSN=SYSP.NDVR.V1802.STAGE2.CSIQSENU
//         INCLUDE MEMBER=SYISPS00
//*
//ISPPLIB  DD DISP=SHR,DSN=SYSP.NDVR.V1802.STAGE2.CSIQPENU
//         INCLUDE MEMBER=SYISPP00
//*
//ISPMLIB  DD DISP=SHR,DSN=SYSP.NDVR.V1802.STAGE2.CSIQMENU
//         INCLUDE MEMBER=SYISPM00
//*
//*
//ISPTLIB  DD DISP=SHR,DSN=SYSP.NDVR.V1802.STAGE2.CSIQTENU
//         INCLUDE MEMBER=SYISPT00
//



Code:

TRACE R   /* TAKE OUT COMMENTS TO SET TRACE ON FOR DEBUGGING */

"ISPEXEC LMINIT DATAID(TMPCIN) DDNAME('"INDD"') ENQ(SHR)"
 IF RC=0 THEN
 DO
 "ISPEXEC LMOPEN DATAID("TMPCIN") OPTION(INPUT)"
  IF RC=0 THEN
  DO

   MEMBER=" "                      /* POSITION AT TOP OF MEMBER LIST */
   DO WHILE RC=0
     MEMBER = STRIP(MEMBER)
     "ISPEXEC LMMLIST DATAID("TMPCIN") OPTION(LIST) MEMBER("MEMBER")" ,
             "STATS(YES)"
     IF RC¬=0 THEN LEAVE
     IF "ZLMDATE" = " " THEN
      DO
       SAY MEMBER "ZLCDATE" "ZLMDATE" "ZLMTIME"
         "ISPEXEC LMMSTATS DATAID("TMPCIN") MEMBER("MEMBER") " || ,
             "CREATED4() MODDATE4() MODTIME() USER()"
       SAY MEMBER "ZLCDATE" "ZLMDATE" "ZLMTIME"
      END
   END

  END
  "ISPEXEC LMFREE DATAID(TMPCIN)"
 END


Code:

1READY
  PROFILE NOPREFIX
 READY
  ISPSTART CMD(STATUPD)
     30 *-* "ISPEXEC LMINIT DATAID(TMPCIN) DDNAME('"INDD"') ENQ(SHR)"
        >>>   "ISPEXEC LMINIT DATAID(TMPCIN) DDNAME('INDD') ENQ(SHR)"
        +++ RC(8) +++
     31 *-* IF RC=0
        >>>   "0"
  NULLFILE was preallocated (no free was done).
 READY
 END
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 683
Location: Pennsylvania

PostPosted: Wed Sep 20, 2017 12:36 am    Post subject:
Reply with quote

You are allocating the DDNAME INDD, not a dataset name.

INDD is a DDNAME literal, and should be no quotes.

Code:
"ISPEXEC LMINIT DATAID(TMPCIN) DDNAME(INDD) ENQ(SHR)"


Try it that way.
Back to top
View user's profile Send private message
Danielle.Filteau

New User


Joined: 02 Dec 2014
Posts: 16
Location: Canada

PostPosted: Wed Sep 20, 2017 12:48 am    Post subject:
Reply with quote

yay! that worked! Thanks so much Dave.
Now I just have to fix the actual REXX code.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Finding IMS resource blocker after se... Hooman24 IMS DB/DC 1 Wed Aug 16, 2017 9:17 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts finding delayed job/s in OPC jzhardy IBM Tools 0 Mon May 29, 2017 9:04 am
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us