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 

File Copy

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
haseen_mohammed
Beginner


Joined: 20 Feb 2006
Posts: 27
Topics: 14

PostPosted: Wed Apr 09, 2008 12:57 pm    Post subject: File Copy Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Apr 09, 2008 1:08 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
haseen_mohammed
Beginner


Joined: 20 Feb 2006
Posts: 27
Topics: 14

PostPosted: Wed Apr 09, 2008 1:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Apr 09, 2008 2:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities 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