SQR 字符串变量

发布于 2024-10-06 10:45:25 字数 103 浏览 0 评论 0原文

我有一个字符串变量,它从查询中获取大约 1184 var,但它在 CSV 格式的 SQR 报告中仅显示 263 个字符。请告诉我如何在我的变量中获取整个字符。请帮助我,我是 SQR 报告的新手

I have a string variable which is getting approx 1184 var from query but it is displaying only 263 character in SQR report which is in CSV format. Please tell how to get whole character in my variable. Please help i m new to SQR Report

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ま昔日黯然 2024-10-13 10:45:25

问题中没有足够的信息来回答。我最好的猜测是,当 SQR 将输出写入 CSV 格式的文件时,结果会被文件属性截断。

在 SQR 中,文件是使用参数打开的:

!-- File is opened but will write only 300 characters
Open $myFile as 10 For-Writing Record=300
!-- other code
Write 10 From $var1 $comma $var2
!-- other code

如果打开的文件包含 300 个字符,那么如果 $var1 和 $var2 的总长度超过 300,则输出中的结果将被截断。

这是我的最佳猜测,因为截断没有发生在 255/256 或 511/512 这样的二进制数边界上。

There is not enough info in the question to answer. My best guess is that when the SQR is writing the output to the CSV formatted file, the results are being truncated by the file properties.

In SQR, files are opened with parameters:

!-- File is opened but will write only 300 characters
Open $myFile as 10 For-Writing Record=300
!-- other code
Write 10 From $var1 $comma $var2
!-- other code

If the file is opened for 300 characters, then if the total length of $var1 and $var2 are over 300, you'll have truncated results in the output.

This is my best guess since the truncation didn't happen on a binary number boundary like 255/256 or 511/512.

吲‖鸣 2024-10-13 10:45:25

如果需要,我们可以通过修改 SQR 初始化文件(又名“sqlsize”)来增加字符串变量大小,以将文本字符串变量的最大允许大小调整为 64K-1 字节。

在这种特殊情况下,限制因素不是变量的大小,而是单个 LET 命令的最大允许长度 - 默认值仅为 2048 字节。我相信您的环境设置为使用默认值。

尝试使用上面的注释增加大小

We could potentially increase String variable size by modifying the SQR initialization file (aka “sqlsize”) to adjust the maximum allowed size of text string variables up to 64K-1 bytes if necessary.

The limiting factor in this particular case is not the size of the variable, but the maximum allowed length of a single LET command – the default for that is only 2048 bytes. I believe your environment is set to use the default.

Try increasing the size using the above comment

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文