Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Needed more information on MOVE statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Sun Jan 25, 2009 7:56 pm    Post subject: Needed more information on MOVE statement
Reply with quote

Can any one help me please?

I want move multiple records, with multiple record lengths need to write into output file, along with incremental values, how I can achieve this?

Expected output, in file

AAAA01
BBBBBBBBBBBBB02
CCCCCCCCCCCCCCCCCC03
DDD04
EEEEEEEE05
FFFFFFFFFFFFFF06
GG07
HHHHHH08

Here after printing string, I am expecting numeric value should get print (value in loop)

Is there any MOVE like
MOVE ‘AAAA’,I TO OUTREC
ADD 1 TO I
MOVE’BBBBBBBB’,I TO OUTREC

How I can get output mentioned above?

Please help me.

Regards,
Srini.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7931
Location: Bellevue, IA

PostPosted: Sun Jan 25, 2009 8:22 pm    Post subject:
Reply with quote

There's a manuals link at the top of the page. Look up reference modification in the COBOL Language Reference. Also, if you have to post again after reading this material, please provide sample input and output records -- saying you want to move 'AAAA',I to the output tells us nothing about what you're thinking you will get for output (such as AAAA,I or AAAAI, AAAA1, AAAA01, AAAA0000000000001 -- to mention just a few).
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


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

PostPosted: Sun Jan 25, 2009 11:45 pm    Post subject:
Reply with quote

To add to Robert's post, the STRING verb might be an alternative to reference modification.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Mon Jan 26, 2009 2:47 am    Post subject:
Reply with quote

Hello,

Are the records lengths to be written variable or is the data only variable?

If the recfm is fb, no problem, if the recfm is vb, read on.

Whether you use reference modification orstring, you will still need to provide information so the write will know the variable length of the record to be written. Neither reference modification nor string will automatically provide length information.
Back to top
View user's profile Send private message
vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Sun Feb 01, 2009 6:12 pm    Post subject:
Reply with quote

Thanks, Thanks a lot Robert Sample, Terry Heinze, Dick scherrer

I am able to get desired output through STRING.

Sorry for updating late, I am out office from past 6 days.

Once again Thanks to all of you icon_biggrin.gif .


Regards,
Srini.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Mon Feb 02, 2009 12:12 am    Post subject: Reply to: Needed more information on MOVE statement
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Obtaining file information pahiker COBOL Programming 25 Tue Sep 27, 2016 7:25 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us