[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Trailing spaces in extract file



Because you use Print command to create the extract file.

you could try creating a variable with 25 space and printing at the first line.

As rule a thumb I always using write command to create all my extracts where 
its easy to handle such issues.

----- Original Message ----
From: Peter Burton <peter.burton@oracle.com>
To: This list is for discussion about the SQR database reporting language from 
Hyperion Solutions. <sqr-users@sqrug.org>
Sent: Thursday, August 9, 2007 6:30:55 AM
Subject: RE: [sqr-users] Trailing spaces in extract file

Maddy,

If you are using "PRINT" statements to create the export file ...

Begin-Report
 Print 'Hello' (1,1)
 Print ' ' (1,26)
 Print 'Goobye (2,1)
End-Report

If you run this as "SQR {pgm} / -xl" all the lines will be trimmed, howvere if 
you run this as "SQR {pgm} / -xl -xtb" the first line will have trailing 
blanks.  Please note that the -XTB flag only applies to the default line 
printer output (i.e. -PRINTER:LP). 


If are creating the export file via the File-IO commands ...

Begin-Report
 Open 'q.dat' As 1 For-Writing Record=32767:Vary
 Let $String = RPad('Last-Line', 25, ' ')
 Write 1 From $String
 Close 1
End-Report 

You can also force a field to be a specific width and trailing blanks will be 
added

Begin-Report
 Open 'q.dat' As 1 For-Writing Record=32767:Vary
 Let $String = 'Final-Line'
 Write 1 From $String:25        ! Pad/Truncate to 25 characters
 Close 1
End-Report 

Either method will create the file "q.dat" and the line will have trailing 
blanks.

Peter

-----Original Message-----
From: sqr-users-bounces+peter.burton=oracle.com@sqrug.org 
[mailto:sqr-users-bounces+peter.burton=oracle.com@sqrug.org] On Behalf Of maddy
Sent: Wednesday, August 08, 2007 4:22 PM
To: This list is for discussion about the SQR database reporting language from 
Hyperion Solutions.
Subject: [sqr-users] Trailing spaces in extract file

I have a extract file that needs to be generated using a Brio SQR program in
which I want to fill the end of the 1st line with 25
spaces.Someone in the SQR users group has suggested me to use XTB flag in
the batch file.

I have included the -XTB flag in the following batch file and didn't see any
difference. Do I have to change the location of the flag in the batch file
to see the trailing spaces. Can someone please send me a sample batch file ?


C:\PROGRA~1\Brio\SQRSe
rver\SYB\BINW\sqrw.exe "D:\RIN6000\BRR296M1.sqr" -vsybDfyTst04era
syC606240/facets -XTB -XMB -e -o -keep "-IC:\PROGRA~1\Brio\REPORT~1
\PROGRAM\;D:\RIN6000\" "-MD:\RIN6000\Mfile.txt"
'D:\RIN6000\dbnames_file_inc441 txt.txt'rem C:\Program
Files\Brio\SQRServer\SYB\BINW\sqrw.exe "D:\RIN6000\BRR296M1.sqr"
-vsybDfyTst04era syC606240/facets > BRR296M1.log

Thanks!
Maddy

_______________________________________________
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







      
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the 
Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users