I don't believe paragraphs give you any flexibility to do what you desire; that type of processing is more relevant to either PROC or BASIC. You can do this in PROC as follows (tested in 9.6 uv and 7.5 DSengine (renumbered)):

MYTEST
0001: PQN
0002: HCONVERT.SQL
0003: H%2
0004: C assume %3 declares number of fields
0005: M
0006: DATA
0007: F;%3;1;-;?%3
0008: IF %3 < "1" GO F
0009: GO B
0010: M
0011: P

This assumes you enter something like: MYTEST FILENAME 4, where 4 is the number of fields you want to generate a DATA statement. It wasn't clear how you would derive the 'no-of-fields-in-<file>' value.

Hope this helps.

At 10:03 AM 8/27/2004, you wrote:
Hi,
I am trying to accomplish the following through a Unidata paragraph:

PA
CONVERT.SQL <<I2, Filename>>
DATA
DATA
DATA
DATA

Assuming that the <file> has 4 fields I do DATA 4 times.
(This requires me to press enter as many times as the number of fields
in the <file>).

Instead of hardcoding the DATA statement 'no-of-fields-in-<file>' number
of times, I want to loop DATA 'no-of-fields-in-<file>' times.
I see that unidata paragraphs don't allow user defined variables and
hence I cannot use any kind of counter.

Is there any way to accomplish the above through paragraphs.

Thanks.
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to