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

RE: [sqr-users] Problems in writing into a fixed length file.



Hi Choudary,
You can do one thing ,you can put all your variables in one var and then
lpad that var and write it to the file.

Let $var_tmp =  $var1 || $var2
Let $var_tmp = lpad($var_tmp,100,' ')
Write 10 from $var_tmp :100

Thanks,
Rahul Kumar


-----Original Message-----
From: sqr-users-bounces+rahul_kumar=adp.com@sqrug.org
[mailto:sqr-users-bounces+rahul_kumar=adp.com@sqrug.org] On Behalf Of
sri kanth
Sent: Wednesday, May 02, 2007 7:23 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] Problems in writing into a fixed length file.


Iam facing problem in writing variables into fixed length file with line

terminator. I am able to write  fixed length file without line
terminators 
but not with line terminators...!!
I am using below code for the same..

open 'test.txt' as 10 for-writing record=100:fixed
write 10 from $var1:20 $var2:15

Then it is writing only 35 length record but not 100..!!

Am I going wrong somewhere..?!

Quick response would be highly appreciated.

Thanks in advance.

-Choudary

_________________________________________________________________
Tried the new MSN Messenger? It's cool! Download now. 
http://messenger.msn.com/Download/Default.aspx?mkt=en-in


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
-----------------------------------------
This message and any attachments are intended only for the use of
the addressee and may contain information that is privileged and
confidential. If the reader of the message is not the intended
recipient or an authorized representative of the intended
recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this
communication in error, notify the sender immediately by return
email and delete the message and any attachments from your system.


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