How to copy one PDS to Other PDS of different LRECL



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: How to copy one PDS to Other PDS of different LRECL

Postby amit_pune » Fri Dec 23, 2011 12:32 pm

dick scherrer wrote:Why did you NOT use the sort as recommended


Hi

It's running well.
But now let me know how i can read each member name from source and copy in other PDS with a same name?
bcoz this script should run in Production automatically.

Amit
amit_pune
 
Posts: 11
Joined: Thu Dec 22, 2011 4:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to copy one PDS to Other PDS of different LRECL

Postby amit_pune » Fri Dec 23, 2011 12:36 pm

[quote="dick scherrer"]Hello,

Why did you NOT use the sort as recommended? :?

Herewith I have attached JCL and all output messages.

//COPYSORT JOB (SDR0,CPSC,3,5),'IEBCOPYX',SCHENV=AA00
//STEP2 EXEC PGM=SORT
//SORTIN DD DSN=SB355U.QQ.PDS(ONE),DISP=SHR
//SORTOUT DD DSN=SB355U.FF.PDS(THREE),DISP=OLD
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
/*
//SYSOUT DD SYSOUT=*
//

..
SYSOUT
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 73032, MODEL 2817 604
SYSIN :
SORT FIELDS=COPY
WER901I **WARNING** SYNCSORT 1.4.0.1 WILL EXPIRE IN 49 DAYS
WER276B SYSDIAG= 284071, 2248047, 2248047, 4056450
WER164B 8,876K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 976K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 800
WER073I SORTIN : DSNAME=SB355U.QQ.PDS
WER110I SORTOUT : RECFM=FB ; LRECL= 120; BLKSIZE= 1200
WER074I SORTOUT : DSNAME=SB355U.FF.PDS
WER462I OUTPUT LRECL DIFFERS FROM SORTOUT LRECL
WER410B 7,848K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LIN
WER410B 0 BYTES RESERVE REQUESTED, 768K BYTES USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
amit_pune
 
Posts: 11
Joined: Thu Dec 22, 2011 4:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to copy one PDS to Other PDS of different LRECL

Postby expat » Fri Dec 23, 2011 12:45 pm

Why must the backup be of a longer LRECL

Why not use IEBCOPY to backup the whole PDS, of DFdss, or whatever else you have installed and each and every member of the PDS will be backed up.
Please explain why each member must be backed up individually.
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: How to copy one PDS to Other PDS of different LRECL

Postby NicC » Fri Dec 23, 2011 12:55 pm

Why not READ THE MANUAL for IEBCOPY - you cannot expect a program to read an 80 byte record and write it out as 120 bytes without telling the program that that is what you want to do - just supplying an output dataset with a different LRECL means you have provided the wrong output file as far as the program is concerned. I am not sure if IEBCOPY has the ability to change the LRECL - IEBGENER does. But why you need to when you say you are taking a backup I do not know. Once the LRECL is changed it is NO LONGER A BACKUP. Yes, you will have to have 340 executions but the setup time can be minimised as Dick suggests. You would have to get a list of members somehow - various methods are available, including Prino's suggestion. A browse through the utilities manual should help.

And you do not have JCL PROGS - you have JCL procedures (or not) that tell the operating system which progs you want executed but the JCL itself is not a prog.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: How to copy one PDS to Other PDS of different LRECL

Postby dick scherrer » Fri Dec 23, 2011 12:56 pm

Hello,

As i mentined earlier:
Probably not, but you could use the list of member names and generate 340 EXEC statements. These could invoke a very small PROCedure (i'd use a proc & pend if i went this route) that used the member name as a symbolic parameter on the input and output datasets.
Create a PROC / PEND using the one-member jcl that worked using the member name(s) as symbolic parameters. Generate an EXEC for each member to be copied.

Something like:
//MYCOPY   PROC,INMEM='XXX',OUTMEM='YYY'
//STEP2    EXEC PGM=SORT
//SORTIN   DD DSN=SB355U.QQ.PDS(&INMEM),DISP=SHR
//SORTOUT  DD DSN=SB355U.FF.PDS(&OUTMEM),DISP=OLD
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSIN    DD DSN=SomeMembeContaining "SORT FIELDS=COPY"
//       PEND

And invoked by:
//COPY1    EXEC MYCOPY,INMEM=ONE,OUTMEM=THREE
Generate a new EXEC statement from the list of members to be copied.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: How to copy one PDS to Other PDS of different LRECL

Postby amit_pune » Fri Dec 23, 2011 1:53 pm

I understood this, but I, then need to manually check the member name to be copied from input DS
eg. ONE
then TWO like, right?
Unless I open yhe PDS how could I know the Member name . And here, I have to feed all 340 member names in INMEM.

Or I shoul have a program which reads the member names of PDS and whatever the name is same should be used against Outmem reference.
amit_pune
 
Posts: 11
Joined: Thu Dec 22, 2011 4:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to copy one PDS to Other PDS of different LRECL

Postby NicC » Fri Dec 23, 2011 2:08 pm

Why do you need to manually check the name etc.? You have been told that it can be done by propgram and if you did some research - or carried on your research - you would find examples of what you need in other sections of the forum - most notably the Rexx section.

You also haven't specified WHY you need to extend the LRECL. If that was not a requirment then you could use standard utilities with no convoluted control cards.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: How to copy one PDS to Other PDS of different LRECL

Postby enrico-sorichetti » Fri Dec 23, 2011 2:13 pm

is this a ONCE/DONE/FINISHED task, or is it a repetitive one ?

if it is a ONCE/DONE/FINISHED one, why the stupidity of I have to do it through JCL prog only not manually.

in this case the fastest is to allocate the new PDS and ISE ISPF option 3.3 to do the copy

if it is a repetitive one most probably the best way is to write a REXX script to invoke the ISPF LMCOPY service
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: How to copy one PDS to Other PDS of different LRECL

Postby amit_pune » Fri Dec 23, 2011 2:19 pm

NicC wrote:Why do you need to manually check the name etc.? You have been told that it can be done by propgram and if you did some research - or carried on your research - you would find examples of what you need in other sections of the forum - most notably the Rexx section.

You also haven't specified WHY you need to extend the LRECL. If that was not a requirment then you could use standard utilities with no convoluted control cards.


Hi
I also dont know why my client has given such a requirement.

But anyway thanx so much . I will search how to find member names in Rexx.

Thx a lot.
amit_pune
 
Posts: 11
Joined: Thu Dec 22, 2011 4:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to copy one PDS to Other PDS of different LRECL

Postby amit_pune » Fri Dec 23, 2011 2:22 pm

enrico-sorichetti wrote:is this a ONCE/DONE/FINISHED task, or is it a repetitive one ?

if it is a ONCE/DONE/FINISHED one, why the stupidity of I have to do it through JCL prog only not manually.

in this case the fastest is to allocate the new PDS and ISE ISPF option 3.3 to do the copy

if it is a repetitive one most probably the best way is to write a REXX script to invoke the ISPF LMCOPY service



Hi

Yes it is repeative. It is for concrete bed in a production. And I dont know Rexx.

But I will ask somebdy other to do it using rexx.

Thanks a lot.
amit_pune
 
Posts: 11
Joined: Thu Dec 22, 2011 4:03 pm
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post