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

Needed more information on MOVE statement


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Jan 25, 2009 8:22 pm
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: 1249
Location: Richfield, MN, USA

PostPosted: Sun Jan 25, 2009 11:45 pm
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

Moderator Emeritus


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

PostPosted: Mon Jan 26, 2009 2:47 am
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
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

Moderator Emeritus


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

PostPosted: Mon Feb 02, 2009 12:12 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
Search our Forums:

Back to Top