View previous topic :: View next topic |
Author |
Message |
haseen_mohammed Beginner
Joined: 20 Feb 2006 Posts: 27 Topics: 14
|
Posted: Wed Apr 09, 2008 12:57 pm Post subject: File Copy |
|
|
Hi,
I have a requirement where i need to copy Fixed Block QSAM file to another with following condition.
1) Say the input file is of 262 bytes with 250 bytes of data
2) The output file will be 262 bytes with first 10 bytes the same. Next 4 bytes will be spaces and then followed by 11th to 250th byte of the input file. So the output file will have 254 bytes with additional 4 spaces from 11th to 14th column.
Can you advise me on how to do this ?
Regards,
Akshay |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Apr 09, 2008 1:08 pm Post subject: |
|
|
haseen_mohammed,
try the following control cards
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(001,010, $ FIRST 10 BYTES
4X, $ 4 SPACES
011,240) $ COPY 240 BYTES FROM POS 11
/* |
_________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
haseen_mohammed Beginner
Joined: 20 Feb 2006 Posts: 27 Topics: 14
|
Posted: Wed Apr 09, 2008 1:44 pm Post subject: |
|
|
Thanks for your help. It worked.
What do i need to change in case i need to populate with some 4 character say 'ABCD' instead of 4 spaces in all the rows in the file.
Regards,
Akshay |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Apr 09, 2008 2:29 pm Post subject: |
|
|
haseen_mohammed,
try the following control cards
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(001,010, $ FIRST 10 BYTES
C'ABCD', $ CONSTANT ABCD
011,240) $ COPY 240 BYTES FROM POS 11
/* |
_________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|