View previous topic :: View next topic
|
Author |
Message |
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
To add to Robert's post, the STRING verb might be an alternative to reference modification. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
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 .
Regards,
Srini. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for letting us know
d |
|
Back to top |
|
|
|