IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Move Corresponding with Fillers


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nagarajan.dharani

New User


Joined: 27 Dec 2006
Posts: 36
Location: Chennai

PostPosted: Fri May 08, 2009 4:29 pm
Reply with quote

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri May 08, 2009 4:44 pm
Reply with quote

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

New User


Joined: 24 Dec 2007
Posts: 9
Location: Chennai

PostPosted: Sun May 10, 2009 10:17 pm
Reply with quote

Move Corresponding will not work with FILLERS
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon May 11, 2009 4:56 am
Reply with quote

Quote:
Move Corresponding will not work with FILLERS


actually, nothing works with FILLER as a reference name.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon May 11, 2009 8:28 am
Reply with quote

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
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon May 11, 2009 11:47 am
Reply with quote

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

New User


Joined: 05 Feb 2007
Posts: 61
Location: Chennai

PostPosted: Thu May 14, 2009 12:30 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu May 14, 2009 5:01 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts How to move DB2 Installation HLQ DB2 4
No new posts How to move values from single dimens... COBOL Programming 1
No new posts Reading the CSV data in COBOL and mov... COBOL Programming 4
Search our Forums:

Back to Top