Page 2 of 3

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

PostPosted: Fri Dec 23, 2011 12:32 pm
by amit_pune
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

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

PostPosted: Fri Dec 23, 2011 12:36 pm
by amit_pune
[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

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

PostPosted: Fri Dec 23, 2011 12:45 pm
by expat
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.

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

PostPosted: Fri Dec 23, 2011 12:55 pm
by NicC
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.

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

PostPosted: Fri Dec 23, 2011 12:56 pm
by dick scherrer
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.

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

PostPosted: Fri Dec 23, 2011 1:53 pm
by amit_pune
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.

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

PostPosted: Fri Dec 23, 2011 2:08 pm
by NicC
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.

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

PostPosted: Fri Dec 23, 2011 2:13 pm
by enrico-sorichetti
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

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

PostPosted: Fri Dec 23, 2011 2:19 pm
by amit_pune
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.

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

PostPosted: Fri Dec 23, 2011 2:22 pm
by amit_pune
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.