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

[sqr-users] How to Substring the Comments_2000



Hi All,
Iam developing an sqr in Purchasing module,the sqr gives an dat file and  
the requirement is that
the comments(Comments_2000) field needs to be substr into 72 characters each 
up till the end of the string.
Iam trying to develop my code in the following way and wondering if its goin 
to work or not.
Can some one help me in this regard.
Thanks in advance
Subrahmanyam Uppuganti


         let #Len_Comments = length($Comments)
         let #lines = #Len_Comments/72
         let #Reminder = #Len_Comments % 72

         if #Reminder <> 0
             let #lines1 = Ceil(#lines)
             let #Var1 = floor(#lines)*72
             let #Sub = #Len_Comments - #Var1
             let #Lines =#Lines1 - 1
         end-if

         let #Conter = 1
         let #Start_Position =1
         let #End_Position =72
         while #Counter < = #lines
                let $Comments1 = substr($comments,#Start_Position,#End_Position)
                let #Start_Position = #Start_Position+72
                let #End_Position = #End_Position+72
                let #Counter =#Counter+1

                do Write-Comments
         End-While
         let $Comments2 = substr($comments,#Var1,#Sub)

_________________________________________________________________
Shop online for kids’ toys by age group, price range, and toy category at 
MSN Shopping. No waiting for a clerk to help you! http://shopping.msn.com

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