×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Switching from variable to JCL

Switching from variable to JCL

Switching from variable to JCL

(OP)
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

RE: Switching from variable to JCL

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

RE: Switching from variable to JCL

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

RE: Switching from variable to JCL

(OP)
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.

RE: Switching from variable to JCL

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close