[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Integer variable in Write function
- Subject: RE: [sqr-users] Integer variable in Write function
- From: "Alexander, Steven" <Steven.Alexander@sanjoseca.gov>
- Date: Thu, 15 Jun 2006 14:19:58 -0700
- Delivery-date: Thu, 15 Jun 2006 17:22:38 -0400
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
You cannot use a variable for the length, but you can omit the length
entirely. If you do, the entire string will be written to the file with
truncation (except according the the record length)or padding. So truncate
or pad before you write.
Alternately, you can use the ASK command to obtain a value from the user (or
the command line) when the program initiates. That value will be like a
defined constant (see below). This won't help you if you want to calculate
the appropriate length.
Ask x_length 'What length should I write?'
Write 2 from $var:{x_length}
-----Original Message-----
From: Vaidyanathan, Ramakrishnan (GE, Corporate,consultant)
[mailto:ramakrishnan.vaidyanathan@ge.com]
Sent: Thursday, June 15, 2006 1:25 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] Integer variable in Write function
Hi,
I want to use a integer variable as a length parameter to the Write
function but it seems its expecting a constant value as its length. Since I
will knowing the length during run time is there any way to accomplish this.
For eg. I want to use some thing like this
Write 2 from $var:#len
Thanks
Ram
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users