View previous topic :: View next topic
|
Author |
Message |
Deepa Natarajan
New User
Joined: 06 Jan 2008 Posts: 11 Location: India
|
|
|
|
Hi I have a copy book like below:
Code: |
05 MSR1-AGE25 PIC X(60) VALUE
'125461258612625126641270412744127841282412865129051294612987'.
05 MSR1-AGE26 PIC X(60) VALUE
'130281306913109131501319113233132741331613358134001344213485' |
Since i was not able 2 give the whole value in a single line, i thought to use continuation character and i gave as below:
Code: |
05 MSR1-AGE24 PIC X(60) VALUE
'1208112119121571219512233122721231112350123891242812467125
- '07'. |
i.e., continuation char is Pos7 and '07' = > in Pos17
But im getting below errors:
"VALUE" literal "'1208112119121571219512233122721231112350123891242812467
125 07'" exceeded the length specified in the "PICTURE" definition. The
literal was truncated to the "PICTURE" definition length.
I can split this but i have nearly 1700 entries so i thought it wud b better to use a continuation character.
Please let me know whether i should give any other details.
can anybody help me solve this??
Thanks in advance.
Deepa |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
icemanroh
New User
Joined: 23 Aug 2008 Posts: 25 Location: Mumbai
|
|
|
|
Try below. Remove all the spaces after -
Code: |
05 MSR1-AGE24 PIC X(60) VALUE
'1208112119121571219512233122721231112350123891242812467125
-'07'. |
|
|
Back to top |
|
|
CaptBill
New User
Joined: 28 May 2009 Posts: 20 Location: Oklahoma City, OK USA
|
|
|
|
Using continuation on a line of any code is a bad idea. I suggest you define the data this way:
Code: |
05 MSR1-AGE24.
10 FILLER PIC X(30) VALUE
'123456789012345678901234567890'.
10 FILLER PIC X(30) VALUE
'123456789012345678901234567890'.
|
You get the same results and much easier for the person that follows you to maintain. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
CaptBill wrote: |
Using continuation on a line of any code is a bad idea. |
excellent! |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
CaptBill wrote: |
Using continuation on a line of any code is a bad idea. I suggest you define the data this way:
Code: |
05 MSR1-AGE24.
10 FILLER PIC X(30) VALUE
'123456789012345678901234567890'.
10 FILLER PIC X(30) VALUE
'123456789012345678901234567890'.
|
You get the same results and much easier for the person that follows you to maintain. |
I agree fully on CaptBill's suggestion that it is a better way of splitting literal value definitions.
But I would anyway suggest that you use an external file for holding the initialisation values to be read and populated into your defined data area, since you mention 1700 data items to be initialised.
That way it should be easier to maintain the initialisation values, especially if the 1700*60 bytes are generated by some algorithm, as I suspect they must be. This also eliminate the need for regenerating the loadmodule if some of the initialisation values will have to be changed. |
|
Back to top |
|
|
|