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 one file to another 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
mfsrini
Beginner


Joined: 10 Aug 2006
Posts: 11
Topics: 6

PostPosted: Wed Feb 20, 2008 2:23 am    Post subject: Copying one file to another file Reply with quote

hi,
i need to copy one file to another file. I doesn't the format of input file. It might be either FB or VB. My output file should be FB. Since, I doesn't know the format of input file, I can't use VTOF in SORT.
please let me know how can i copy.

thanks,
Srinivas.k
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Wed Feb 20, 2008 6:57 am    Post subject: Reply with quote

why not use one of the copy utilities e.g. IEB/ICEGENER?
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
mfsrini
Beginner


Joined: 10 Aug 2006
Posts: 11
Topics: 6

PostPosted: Thu Feb 21, 2008 6:29 am    Post subject: Re: copying Reply with quote

nic,
I used IEBGENER also. But still I am getting abend.
In my case, input file is dynamically creating in one program. Some time it imight create with VB and some times it might create with FB. I need to take that file as input to my jcl and create one output file with FB.
Since the input file format not knowing, I couldn't able to use SORT,IEBGENER,etc. utilities.
please help me how to do in this case.
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Thu Feb 21, 2008 10:10 am    Post subject: Reply with quote

1. The program could check the DCB of input file after opening the input file and examine the attributes. I've done this in Assembler but I think there have been COBOL examples of looking at the FD.

2. What if the creating programs set a different COND CODE for VB or FB and you could exec either of two copy steps?
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
mfsrini
Beginner


Joined: 10 Aug 2006
Posts: 11
Topics: 6

PostPosted: Thu Feb 21, 2008 1:13 pm    Post subject: Re: copying Reply with quote

Bill,
Is it possible to handle within one step
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Thu Feb 21, 2008 5:15 pm    Post subject: Reply with quote

You could have one step that copies the file with RECFM=U,BLKSIZE=32760 coded on input and output. The copy will always run but whoever uses the copied file will need to specify the actual DCB info when they read it.
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Sat Feb 23, 2008 5:47 am    Post subject: Reply with quote

REXX will copy the file to the specified format easily enough.
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
edkir98
Beginner


Joined: 27 Aug 2007
Posts: 102
Topics: 42
Location: Chennai

PostPosted: Mon Feb 25, 2008 9:17 am    Post subject: Re Reply with quote

This is the REXX code. Put it in an IKJEFT utility and you'll get the output
Code:
/******** REXX **************/                     
"ALLOC DA('input file') FI(INFILE) SHR REUSE"
"EXECIO * DISKR INFILE(STEM ARR. FINIS)"           
"FREE DD(INFILE)"                                 
"ALLOC DA('output file') FI(OUTFILE) SHR REUSE"
"EXECIO * DISKW OUTFILE(STEM ARR. FINIS)"         
"FREE DD(OUTFILE)"                                 

_________________
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
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