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
 
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: 4650
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

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