View previous topic :: View next topic |
Author |
Message |
mfsrini Beginner
Joined: 10 Aug 2006 Posts: 11 Topics: 6
|
Posted: Wed Feb 20, 2008 2:23 am Post subject: Copying one file to another file |
|
|
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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Wed Feb 20, 2008 6:57 am Post subject: |
|
|
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 |
|
 |
mfsrini Beginner
Joined: 10 Aug 2006 Posts: 11 Topics: 6
|
Posted: Thu Feb 21, 2008 6:29 am Post subject: Re: copying |
|
|
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 |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Thu Feb 21, 2008 10:10 am Post subject: |
|
|
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 |
|
 |
mfsrini Beginner
Joined: 10 Aug 2006 Posts: 11 Topics: 6
|
Posted: Thu Feb 21, 2008 1:13 pm Post subject: Re: copying |
|
|
Bill,
Is it possible to handle within one step |
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Thu Feb 21, 2008 5:15 pm Post subject: |
|
|
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 |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Sat Feb 23, 2008 5:47 am Post subject: |
|
|
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 |
|
 |
edkir98 Beginner

Joined: 27 Aug 2007 Posts: 102 Topics: 42 Location: Chennai
|
Posted: Mon Feb 25, 2008 9:17 am Post subject: Re |
|
|
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 |
|
 |
|
|