Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : All available storage is assigned to the job or jobstep, If REGION is coded 0K or 0M

Google
 
Web mainframegurukul.com

To copy a load module mem from one pds to another thru rexx

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> TSO, CLIST & REXX
  View previous topic :: View next topic  
Author Message
meena_cts
Member


Joined: 13 Feb 2007
Posts: 5

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Mar 12, 2007 11:26 am    Post subject: To copy a load module mem from one pds to another thru rexx Reply with quote

Hi,
I need to copy a load module member from one pds to another thru Rexx Pgm.
But this doesn't work.
Can U PLease Help out?
Note:I am able to do the below task manually (i.e) copy loadmodule from one PDS to another mentioned below )

Below is the code which i tried..........


/* rexx */
"Alloc Fi(SYSUT1) Da('ENDH1.B0YCL007.SBATLOAD(ABEND1)') Shr Reu"
"Alloc Fi(SYSUT2) Da('N408f0.GULF.LOADLIB(ABEND1)') Shr Reu"
"Alloc Fi(SYSPRINT) Sysout Reu"
"Alloc Fi(SYSIN) Dummy Reu"
"IEBGENER"
say 'Copy return code = 'rc
"Free Fi(SYSUT1 SYSUT2 SYSIN SYSPRINT)"
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

Veera
Moderator


Joined: 22 Feb 2006
Posts: 111

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Sat Mar 17, 2007 2:59 am    Post subject: Reply with quote

Hi Meena,

Copying Load Modules is bit tricky because of its RECFM = U, it took some time to figure out a way do it....Find below the code for what u have asked in JCL, i guess u can transalte into REXX..

We can achieve that by using 2 steps as below


//TESTLOAD JOB (AAAA,04,T,0000),'LOAD M',CLASS=K,MSGCLASS=T,
// NOTIFY=&USERID/USER..ID
//*
//*
/*JOBPARM L=9999
//*
//JOBLIB DD DSN=AAAA.PPROD.LOAD,DISP=SHR
//*
//STEP01 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=0
//INPDS DD DSN=AAAA.TEST.LOAD(ABCDEFGH), ---> Load Lib PDS Member. // DISP=SHR
//BACKUP DD DSN=AAAA.VEER.LOAD.BKUP, ---> Output File // DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(50,100),RLSE),
// DCB=(MLDSCB,BLKSIZE=0)
//SYSUT3 DD DSN=AAAA.VEER2.BKUP.TEMP,
// DISP=(,DELETE,DELETE),
// UNIT=SYSDA,
// SPACE=(50,(50,125))
//SYSIN DD *
COPY OUTDD=BACKUP,INDD=INPDS
/*
//*
//STEP02 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=0
//SYSUT1 DD DSN=AAAA.VEER.LOAD.BKUP,
// DISP=SHR,DCB=(RECFM=U,LRECL=0) -> HERE TREAT THE I/P FILE AS RECFM = U //SYSUT2 DD DSN=AAAA.VEER.LOAD.BKUP.NEW,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(100,100),RLSE)
//SYSIN DD DUMMY
/*

Where ever applicable you can change the PS TO PDS.
Meena please let us know in case you need any more info on this.

Thanks,
Veera
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
meena_cts
Member


Joined: 13 Feb 2007
Posts: 5

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Mar 20, 2007 5:47 pm    Post subject: Reply with quote

Hi,

Thanks for the Info.

Thru Jcl, I am able to do it.

Below is the Jcl code

//Jobcard
//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SOURCEI DD DSN=ENDH1.B0YCL007.SBATLOAD,DISP=SHR
//SOURCEO DD DSN=N408F0.GULF.LOADLIB,DISP=SHR
//SYSIN DD *
COPY I=((SOURCEI,R)),O=SOURCEO
S M=ABEND1
/*

The same thing in Rexx,I am not able to make it out.

Find below the Rexx code which I tried

/* rexx */
"Alloc Fi(SYSUT1) Da('ENDH1.B0YCL007.SBATLOAD(ABEND1)') Shr Reu"
"Alloc Fi(SYSUT2) Da('N408F0.GULF.LOADLIB(ABEND1)') Shr Reu"
"Alloc Fi(SYSPRINT) Sysout Reu"
"Alloc Fi(SYSIN) DUMMY Reu"
"IEBCOPY"
/*"COPY INDD=SYSUT1,OUTDD=SYSUT2"
"S M=ABEND1" */
/*"copy OUTDD(out1) INDD(in1)"*/
say 'Copy return code = ' rc
"Free Fi(SYSUT1 SYSUT2 SYSIN SYSPRINT)"
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Veera
Moderator


Joined: 22 Feb 2006
Posts: 111

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Mar 20, 2007 11:17 pm    Post subject: Reply with quote

Hi Meena,

Using IEBCOPY copy into a PS file not PDS, a PS will be created with format VS, and then use IEBGENER which wud convert the PS file
format of VS , which u need to treat it as RECFM = U, into outfile
try the out file using PS/PDS both.

I am not sure whether using only one step IEBCOPY u will be able to
achieve it. We need to use both the steps as i have given in my
sample JCL, few utilites doesnot support RECFM = U thats the
issue when we are trying to copy the LOAD modules.

Well try usign 2 utilites/steps and if this doesn work let us know wil try the same in REXX and get back to you.

Just as Info :
When u ran IEBCOPY using JCL the out pds is already preallocated
and did u check if the member got copied correctly even though the
return code is 0.

Thanks
Veera.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Veera
Moderator


Joined: 22 Feb 2006
Posts: 111

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Mar 20, 2007 11:48 pm    Post subject: Reply with quote

Meena

I have tried some code check this...

The below are 2 seperate REXX routines


Step 1: IEBCOPY

Info : Copying the Load modules into PS file.
(Dont worry abt this file , unless u copy using the IEBGENR we may not be
able to view the file)

/**************************REXX***************************************/
"ALLOC FI(SYSUT1) DA('ABCD.TEST.LOAD') SHR REU"
ADDRESS "TSO" "ALLOC DD(SYSUT2) DS('ABCD.TEST.PSFILE') NEW" ,
"DSORG(PS) LRECL(28014) SPACE(100,200) CYLINDERS"
"ALLOC FI(SYSPRINT) SYSOUT REU"
"ALLOC FI(SYSIN) DA('ABCD.TEST.SYSIN(CARD)') SHR REU"
"IEBCOPY"
SAY 'COPY RETURN CODE = 'RC
"FREE FI(SYSUT1 SYSUT2 SYSPRINT SYSIN)"

Step 2: IEBGENER

Info : Here when i read the I/P file i enforce and read the file with RECFM = U
and finally the file gets copied into another file which we will be
able to browse, this is the final load module copied.

/**************************REXX***************************************/
"ALLOC FI(SYSUT1) DA('ABCD.TEST.PSFILE') SHR REU RECFM(U)"
ADDRESS "TSO" "ALLOC DD(SYSUT2) DS('ABCD.TEST.FINALOUT') NEW",
"DSORG(PS) SPACE(100,200) CYLINDERS"
"ALLOC FI(SYSPRINT) SYSOUT REU"
"ALLOC FI(SYSIN) DUMMY REU"
"IEBGENER"
SAY 'COPY RETURN CODE = 'RC
"FREE FI(SYSUT1 SYSUT2 SYSPRINT SYSIN)"

NOTE : I do not have knowledge on REXX i just changed it from your code
so we have to change the code here and there to use PDS and its
members instead of files..any manual shd help u do that.

When u try the code try with only one LOAD module member in
a PDS. I executed the above two REXX routines as 2 diff
routines ...so if u wish u can combine..



Thanks
Veera.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
meena_cts
Member


Joined: 13 Feb 2007
Posts: 5

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Mar 21, 2007 6:31 pm    Post subject: Reply with quote

Thanks
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Feb 01, 2016 10:55 pm    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> TSO, CLIST & REXX All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Query For IEBPTPCH 3 padmajeet.gaikwad 13444 Mon Feb 01, 2016 10:56 pm
academyindia4 View latest post
No new posts Unable to achieve below scenario using ICETOOL 27 sirianangel 33681 Mon Feb 01, 2016 10:01 pm
academyindia4 View latest post
No new posts Need to put records a Sorting order as mentioned below. 14 Yash1911 12633 Mon Jan 25, 2016 9:50 pm
academyindia4 View latest post
No new posts how to deal with the below scenario using iebgener 7 mainframes_6002 11170 Wed Dec 07, 2011 10:34 am
DikDude View latest post
No new posts Coulu someone explain the parameters in the below code? 1 lovely sweety 11352 Thu Jun 09, 2011 3:50 pm
dbzTHEdinosauer View latest post
 


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-2355.html