Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switching from variable to JCL

Status
Not open for further replies.

LLuc

Technical User
May 1, 2018
20
FR
Hi,

I would like to pass these variables to activate the step by &DEFx = Y and put the member (&MBDEDFx) of pds. The result of the REXX can find several members of the PDS and it is necessary to activate as many steps as members found.

In advance Thank you.



ADDRESS DSNREXX "EXECSQL FETCH C1 INTO :OUTSQL "
IF SQLCODE = 100 & cpt=0 then do
say 'Not found in Table'
pasdanstable = 1
end
IF SQLCODE = 0 THEN DO
MEMBER = STRIP(OUTSQL)
MBDEDF.CPT = MEMBER
DEF.CPT = O
END
cpt=cpt+1


the result oif teh rexx find 6 members and to active 6 step by skelett i have to pass :
DEF1 =Y
MBDEDF1 =AAAAAA
DEF2 =Y
MBDEDF2 =BBBBBB
DEF3 =Y
MBDEDF3 =CCCCCCC




for example skel jcl:

)SEL &DEF1 = Y <==== ?
//*
//DELDEF2 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=&DLIB(&MBDEDF1), <===== ?
// DISP=SHR
//*
)ENDSEL

)SEL &DEF3 = OY <==== ?
//*
//DELDEF2 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=&DLIB(&MBDEDF2), <===== ?
// DISP=SHR
//*
)ENDSEL

The result must be :

)SEL DEF1 = Y <==== ?
//*
//DELDEF1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=aaa.bbbb(AAAAAA), <===== ?
// DISP=SHR
//*
)ENDSEL

)SEL DEF3 = Y <==== ?
//*
//DELDEF2 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=aaa.bbbb(BBBBBB), <===== ?
// DISP=SHR
//*
)ENDSEL
 
I am not totally sure what you are wanting to achieve. I do not know why you are using an SQL query to get the member names - maybe some sort of data dictionary held on DB2. I do not know whether you are trying to create a skeleton or update one. I do not know what is going to use that skeleton.

I suspect that there is a simpler and more effective way of doing what you want. I also suspect that you may get more help using one of the dedicated mainfrme forums.


Nic
 
well, I have not seen you on any of the other fora around the internet and you have not come back with your requirement.
My best guess is:
Code:
get list of members
If members found
Then Do
   create job card
   store on queue
   for each member
      generate JCL for step
      store on queue
   End /* for */
   submit queue to internal reader
End /* if */


Nic
 
HI,

we downloaded the data from PDS to db2 because the search for member is much faster. thank you for spending time to solve this problem
but I think I found the solution.
the problem of this project is to be able to restore without problem the files vsam aix and path whose base is not identical because copy renameu and adrdssu does not work in this kind of definition.
 
I doubt that either of those points is true but if you posted on one of the mainframe forums there is MUCH MORE experience there and they would be able to confirm or deny.


Nic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top