Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to use SUBSYS in REXX

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

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Oct 12, 2007 3:23 am    Post subject: How to use SUBSYS in REXX
Reply with quote

How could I code in REXX the equivalent of the following JCL:
//INFILE DD DSN=HLQ.PANLIB(ABCDEFGH),DISP=SHR,SUBSYS=PANV
or
//INFILE DD DSN=HLQ.PRODPAN,DISP=SHR,SUBSYS=(PANV,,ABCDEFGH)

I tried Altfile with the following results:
Code:
     11 *-* "ALLOCATE DDNAME(INFILE) SHR " ,                                   
        " DSNAME('HLQ.PANLIB(ABCDEFGH)') ALTFILE(PANV)"                         
        >>>   "ALLOCATE DDNAME(INFILE) SHR   DSNAME('HLQ.PANLIB(ABCDEFGH)') ALTF
 ILE(PANV)"                                                                     
 FILE INFO-RETRIEVAL NOT PERFORMED, IS NOT ALLOCATED                           
        +++ RC(12) +++

I have tried many way and done searches on these Forums and the web , but I have not found how to get this to work.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Oct 12, 2007 6:30 am    Post subject: Reply to: How to use SUBSYS in REXX
Reply with quote

Looks like you may have to use BPXWDYN for your dynamic allocation.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Mon Oct 15, 2007 8:13 pm    Post subject:
Reply with quote

Thank you. icon_smile.gif I got it working. Here is a sample.
Code:
//* REXX PANSUBS ICEGENER USING SUBSYS PANV TO RETRIEVE FROM PAN */
/* ************************************************************* */
/* //STEP10  EXEC PGM=ICEGENER                                   */
/* //SYSUT1  DD DSN=HLQ.PANLIB,DISP=SHR,SUBSYS=(PANV,,HLQ1781)   */
/* //SYSUT2  DD DSN=HLQ.A.Z,DISP=OLD                             */
/* //SYSPRINT  DD SYSOUT=*                                       */
/* //SYSIN     DD DUMMY                                          */
/* ************************************************************* */
"FREE FI(SYSUT1 SYSUT2 SYSPRINT SYSIN)"
"ALLOC FI(SYSUT2)   DA('HLQ.A.Z')"
"ALLOC FI(SYSPRINT) DA(*)"
"ALLOC FI(SYSIN)    DUMMY"
SAY '--------------------------------------------------------------
IF BPXWDYN(,
   "ALLOC FI(SYSUT1) DA(HLQ.PANLIB) SHR SUBSYS(PANV,,HLQ1781)",
            ) = 0 THEN DO
    SAY 'PANLIB ALLOC OK <===='
END
ELSE DO
    SAY 'PANLIB ALLOC FAILED <===='
    DO I = 1 TO S99MSG.0
        SAY I   S99MSG.I
    END
END
SAY '----------------------------------------------------------------'
ADDRESS LINKMVS "ICEGENER"
SAY '----------------------------------------------------------------'
"FREE FI(SYSUT1 SYSUT2 SYSPRINT SYSIN)"
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 REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us