Padding data with spaces

Infosphere's Quality Product

Moderators: chulett, rschirm

Post Reply
PilotBaha
Premium Member
Premium Member
Posts: 202
Joined: Mon Jan 12, 2004 8:05 pm

Padding data with spaces

Post by PilotBaha »

I 've got a simple problem about padding data with spaces. Say, I have a record of 2000 chars long and I want to assign spaces from position 1000 to position 1500. The way I would do this is with smaller size data is through transfer stage and an assign command. However when we are talking about a data of size it appears to be a problem. (actually two).
The QS GUI won't take any spaces more than 40 chars in the assign command. If I want to press space once for a field that is 500 chars long, it will put only one space and a CR/LF after that which screws up the data.

Does anyone have a solution to this? I know it is unusual to assign spaces this long, but client wants us to take care of this in QS to avoid going back and forth between QS and DS.

Thanks..
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

To get a string of spaces, try SPACE(500). Another method is STR(" ", 500). Another method is to format a variable, padding it to the desired width and justification. This is FMT(variable, 'R#500') to right justify in a field of 500 spaces. Look in your DS BASIC manual for more information.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
PilotBaha
Premium Member
Premium Member
Posts: 202
Joined: Mon Jan 12, 2004 8:05 pm

Post by PilotBaha »

I was strickly talking about the QS perspective, not DS. I know this is a childs play in DS, but not in QS..

Thanks...
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Sorry, didn't notice the topic was QualityStage. :oops:
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply