View previous topic :: View next topic
|
Author |
Message |
nagarajan.dharani
New User
Joined: 27 Dec 2006 Posts: 36 Location: Chennai
|
|
|
|
Hi,
I have a file in the below layout,
Code X(5)
Year 9(4)
Filler X(5)
Amount1 S9(9)
Amount2 S9(9)
Amount3 S9(9)
Amount4 S9(9)
I need to copy the above file into another file which has the
below layout,
Code X(5)
Year 9(4)
Filler X(10)
Amount1 S9(13)
Amount2 S9(13)
Amount3 S9(13)
Amount4 S9(13)
Please let me know hoe can I copy the file using Move corresponding? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
Please let me know hoe can I copy the file using Move corresponding? |
here is how you can find out:
this link list all COBOL documents.
Pick the vsn/system applicable to your site.
By the way, MOVE CORRESPONDING is not a good habit to get into.
it may save you time, but if the layout changes
(see possible problems notated in documentation)
it will cause someone else grief. |
|
Back to top |
|
|
Rajesh1979
New User
Joined: 24 Dec 2007 Posts: 9 Location: Chennai
|
|
|
|
Move Corresponding will not work with FILLERS |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
Move Corresponding will not work with FILLERS |
actually, nothing works with FILLER as a reference name. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I'm probably way lost, but is there some reason the filler is not simply changed to some "real" name. . . ?
I'm also not a fan of "move corresponding", but this particular use seems pretty straightforward. . . |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Rajesh1979 wrote: |
Move Corresponding will not work with FILLERS |
I think it might be more accurate to say that FILLERs are ignored during a MOVE CORR. I normally don't like MOVE CORR also, but in the case of rearranging a date from one format to another, it's handy. For instance, moving ccyymmdd to mm/dd/ccyy. |
|
Back to top |
|
|
hariibm
New User
Joined: 05 Feb 2007 Posts: 61 Location: Chennai
|
|
|
|
what if the FILLER items are the first elementary items of two different group items and the remaining items of both groups are of the same length and of same type.
Will the other items except FILLER get the values after MOVE CORRESPONDING?
or the destination elements do not get any values at all? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Did you try it? What results did you get?
There is a link to the manuals at the top of the page. Bring up the COBOL Language Reference and read section 6.1.8.1 on CORRESPONDING rules. This should help you. |
|
Back to top |
|
|
|