View previous topic :: View next topic
|
Author |
Message |
vin12pr Warnings : 1 New User
Joined: 14 Jun 2006 Posts: 56
|
|
|
|
01 WS-TBL.
05 WS-tbl-AREA OCCURS 20 TIMES INDEXED BY INDEXD.
10 POL-LINE PIC X(81).
10 FILLER REDEFINES POL-LINE.
15 COV-TITLE PIC X(30).
15 FILLER PIC X(01).
15 COV-DIS-COL PIC X(18) JUST RIGHT.
15 COV-DIS-COL-2 PIC X(16) JUST RIGHT.
15 COV-DIS-COL-3 PIC X(16).
Proc div.
IF cond1
IF cond2
STRING BOP-FORMAT-12 DELIMITED BY SIZE
'@ACV' DELIMITED BY SIZE
INTO COV-DIS-COL
end if
endif
Is the above string statement valid??
Can we move a stringed data to a table filed with justified clause.
Thanks,
Vin12pr |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The above is not valid - the target field needs to be qualified by the index. You didn't show the first field in the string. . .
You can string data into a field in a table/array. The JUST RIGHT may be lost as string works from left to right - try it on your machine and let us know what happens.
If you post what data you have and what you want done with it, we can offer suggestions on how you might write the code. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
vin12pr wrote: |
Is the above string statement valid? |
Did it compile?
vin12pr wrote: |
Can we move a stringed data to a table filed with justified clause. |
Did you try it. What happened? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Refering to the recieving field, the FM does state: It must not represent an edited data item or external floating-point item and must not be described with the JUSTIFIED clause.
I would have assumed that it just ignored the clause, but maybe it does raise a compile error...... |
|
Back to top |
|
|
vin12pr Warnings : 1 New User
Joined: 14 Jun 2006 Posts: 56
|
|
|
|
yeah it did gave me a compile error ..
Any solutions ? |
|
Back to top |
|
|
vin12pr Warnings : 1 New User
Joined: 14 Jun 2006 Posts: 56
|
|
|
|
yeah dick ..just forgot to mention index in my code,still u will get the compile error
01 WS-TBL.
05 WS-tbl-AREA OCCURS 20 TIMES INDEXED BY INDEXD.
10 POL-LINE PIC X(81).
10 FILLER REDEFINES POL-LINE.
15 COV-TITLE PIC X(30).
15 FILLER PIC X(01).
15 COV-DIS-COL PIC X(18) JUST RIGHT.
15 COV-DIS-COL-2 PIC X(16) JUST RIGHT.
15 COV-DIS-COL-3 PIC X(16).
Proc div.
IF cond1
IF cond2
STRING BOP-FORMAT-12 DELIMITED BY SIZE
'@ACV' DELIMITED BY SIZE
INTO COV-DIS-COL (INDEX D)
end if
endif |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
For this
Do this
Quote: |
If you post what data you have and what you want done with it, we can offer suggestions on how you might write the code.
|
Show some "input" and how it should be in the result field/array item after the string. |
|
Back to top |
|
|
|