MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Copying Different LRECL files into one large Lrecl File

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
mfuser
Banned


Joined: 01 Mar 2005
Posts: 105
Topics: 58

PostPosted: Thu Nov 17, 2005 2:14 pm    Post subject: Copying Different LRECL files into one large Lrecl File Reply with quote

Hai all,

I have a dataset with a single record in it with LRECL=80 and i use it as a header to concatinate to some other output file.PROJECT.TEST.HEADER is only 80 bytes and PROJECT.TEST.OUTFILE is 160 bytes.Now when i run this job,it fails due to DCB attributes mismatch as we cannot concatinate the two datasets as LRECL is different.If i delete the dataset PROJECT.TEST.HEADER and create a new dataset by name PROJECT.TEST.HEADER with LRECL=160 bytes the job runs fine and i am getting the desired output.Is there anyway where in we can change the existing's dataset LRECL from 80 bytes to 160 bytes without deleting it as my main concern is i do not want to delete the dataset and create a new one.Is it possible and how can my problem be solved and please correct me if i am wrong ?


Code:

//STEP0100 EXEC PGM=IEBGENER
//SYSUT1   DD   DSN=PROJECT.TEST.HEADER,DISP=SHR
//         DD   DSN=PROJECT.TEST.OUTFILE,DISP=SHR
//SYSUT2   DD   DSN=PROJECT.TEST.OUT,DISP=(NEW,CATLG,CATLG),
//              DCB=(LRECL=160,RECFM=FB,BLKSIZE=27840),UNIT=SYSDA
//              SAPCE=(TRK,(1,1),RLSE)




PROJECT.TEST.HEADER(LRECL=80)

Code:

TODAY IS THURSDAY



PROJECT.TEST.OUTFILE(LRECL=160)

Code:

1
2
3
4
5



EXPECTED PROJECT.TEST.OUT

Code:

TODAY IS THURSDAY
1
2
3
4
5

Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12360
Topics: 75
Location: San Jose

PostPosted: Thu Nov 17, 2005 2:44 pm    Post subject: Reply with quote

mfuser,

If your shop has fileaid , then you can concatenate different Lrecl datasets. try this job.

Code:

//STEP0100 EXEC PGM=FILEAID
//SYSPRINT DD  SYSOUT=*               
//SYSLIST  DD  SYSOUT=*               
//DD01     DD  DSN=PROJECT.TEST.HEADER,   
//             DISP=SHR               
//         DD  DSN=PROJECT.TEST.OUTFILE,
//             DISP=SHR               
//DD01O    DD  DSN=PROJECT.TEST.OUT,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(TRK,(1,1),RLSE),
//             DCB=(LRECL=160,RECFM=FB,BLKSIZE=27840)
//SYSIN    DD  *                       
$$DD01 COPY                           


Another alternative is to run 2 steps.

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=PROJECT.TEST.HEADER,
//            DISP=SHR
//SORTOUT DD  DSN=PROJECT.TEST.OUT,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1),RLSE)
//SYSIN    DD  *                       
  SORT FIELDS=COPY
  OUTREC FIELDS=(1,80,80X)
/*
//STEP0200 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=PROJECT.TEST.OUTFILE,
//            DISP=SHR
//SORTOUT DD  DSN=PROJECT.TEST.OUT,
//            DISP=MOD,                 
//            SPACE=(TRK,(1,1),RLSE)   
//SYSIN    DD  *                       
  SORT FIELDS=COPY
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Thu Nov 17, 2005 2:57 pm    Post subject: Reply with quote

Code:

//STEP010  EXEC PGM=SYNCTOOL
//DFSMSG   DD SYSOUT=*
//TOOLMSG  DD SYSOUT=*
//IN       DD DSN=USERID.TEST.HEADER,DISP=SHR
//T1       DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//CON      DD DSN=&T1,DISP=(OLD,PASS),VOL=REF=*.T1
//         DD DSN=USERID.TEST.OUTFILE,DISP=SHR
//OUT      DD  DSN=USERID.TEST.OUTFIL2,
//             DISP=(,CATLG),SPACE=(CYL,(1,1),RLSE)
//TOOLIN   DD *
  COPY FROM(IN)     USING(CTL1)
  COPY FROM(CON) TO(OUT)
//CTL1CNTL DD *
  OUTFIL FNAMES=T1,
  OUTREC=(1,80,160:X)
Back to top
View user's profile Send private message
mfuser
Banned


Joined: 01 Mar 2005
Posts: 105
Topics: 58

PostPosted: Thu Nov 17, 2005 4:22 pm    Post subject: changing the dcb parameters Reply with quote

Thanks Kolusu & Ravi ,

I have tried out all the three JCLS in my shop and i am acheiving my desired results correctly.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) 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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group