Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Copy 5 files with LRECL = 80 in one file having LREC=400

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
joyhappi

New User


Joined: 26 Jul 2005
Posts: 4

PostPosted: Tue Jul 26, 2005 1:45 am    Post subject: Copy 5 files with LRECL = 80 in one file having LREC=400
Reply with quote

Hi,

I have to copy 5 files having LRECL = 80 in one file having a lrecl of 400. Please note that the 2nd file should start from the 81st position and not below the file one. There should be no increase in number of rows. Only the record lenght should be increased after each file being copied successfully.

Thanks,
Joyhappi
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jul 26, 2005 1:49 am    Post subject:
Reply with quote

It's not clear to me what you want to do (I'd rather not guess). Please show an example of the input records in each file and what the output records should look like.
Back to top
View user's profile Send private message
joyhappi

New User


Joined: 26 Jul 2005
Posts: 4

PostPosted: Tue Jul 26, 2005 1:54 am    Post subject:
Reply with quote

I need to merge 5 files of lrecl = 80 in one single file. The condition is that 2nd file should begin from first row and 81st column and the third file should begin from the first row but 161st column position and so on.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jul 26, 2005 4:42 am    Post subject:
Reply with quote

Your use of the word "file" is confusing. I think you mean "record" rather than "file"? I asked you to show the input and output records, but you didn't so it's still not clear what you want. Do you want to take record n from each input file and create record n in the output file with those five input records one after the other. Something like this:

Code:

input file1
<file1 record1>
<file1 record2>

input file2
<file2 record1>
<file2 record2>

input file3
<file3 record1>
<file3 record2>

input file4
<file4 record1>
<file4 record2>

input file5
<file5 record1>
<file5 record2>

output file
<file1 record1><file2 record1>...<file5 record1>
<file1 record2><file2 record2>...<file5 record2>


If not, then please show an example of your input records and output records and explain more clearly what you want.

In the future, if you want faster answers, please provide more detailed information the first time you post. Don't make us guess.
Back to top
View user's profile Send private message
joyhappi

New User


Joined: 26 Jul 2005
Posts: 4

PostPosted: Tue Jul 26, 2005 5:06 am    Post subject: Re: JCL Query
Reply with quote

Yes, this is the exact format I want. The output file should have all the records from 5 input files.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jul 26, 2005 5:18 am    Post subject:
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/80)
//IN2 DD DSN=...  input file2 (FB/80)
//IN3 DD DSN=...  input file3 (FB/80)
//IN4 DD DSN=...  input file4 (FB/80)
//IN5 DD DSN=...  input file5 (FB/80)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (FB/400)
//TOOLIN DD *
 COPY FROM(IN1) TO(T1) USING(CTL1)
 COPY FROM(IN2) TO(T1) USING(CTL2)
 COPY FROM(IN3) TO(T1) USING(CTL3)
 COPY FROM(IN4) TO(T1) USING(CTL4)
 COPY FROM(IN5) TO(T1) USING(CTL5)
 SPLICE FROM(T1) TO(OUT) ON(401,8,ZD) -
   WITHEACH WITH(81,80) WITH(161,80) WITH(241,80) WITH(321,80) -
   USING(CTL6)
/*
//CTL1CNTL DD *
  OUTREC FIELDS=(1,80,401:SEQNUM,8,ZD)
/*
//CTL2CNTL DD *
  OUTREC FIELDS=(81:1,80,401:SEQNUM,8,ZD)
/*
//CTL3CNTL DD *
  OUTREC FIELDS=(161:1,80,401:SEQNUM,8,ZD)
/*
//CTL4CNTL DD *
  OUTREC FIELDS=(241:1,80,401:SEQNUM,8,ZD)
/*
//CTL5CNTL DD *
  OUTREC FIELDS=(321:1,80,401:SEQNUM,8,ZD)
/*
//CTL6CNTL DD *
  OUTFIL FNAMES=OUT,OUTREC=(1,400)
/*


See the following Smart DFSORT Trick for some more information on this technique:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst03.html#t01
Back to top
View user's profile Send private message
joyhappi

New User


Joined: 26 Jul 2005
Posts: 4

PostPosted: Tue Jul 26, 2005 5:54 am    Post subject:
Reply with quote

Thanks a lot Frank.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us