用包含空值的物理文件替代DSPF的好方法是什么? [英] What is a good substitute for DSPF with physical files that contain nulls?

查看:131
本文介绍了用包含空值的物理文件替代DSPF的好方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现命令DSPF(显示物理文件)不能正确显示包含空值的记录.如果我在字段中使用ALWNULL关键字在DDS中定义一个物理文件,然后用数据填充该文件,则DSPF将正确显示不包含空值的记录的数据,但是包含至少一个空值的所有记录将仅显示空字段和非空字段中都为空白.

I have found that the command DSPF (Display Physical file) does not correctly display records that contain a null. If I define a physical file in DDS with the ALWNULL keyword on a field, then fill the file with data, DSPF will correctly display the data for records without nulls, but all records that contain at least one null will display only blanks in both the null and the non-null fields.

这可能会引起误解.例如,在下面的屏幕快照中,看似空白的记录的大多数字段中都有数据,而日期中只有null.在字符模式下,它显示为空白;在十六进制模式下,它显示为零,这并不表示物理文件中存储的实际值是什么.

This can be misleading. For example in the screenshot below, the seemingly blank records have data in most of their fields with null only in the date. It displays as blanks in character mode and as zeros in hex mode, not indicating what the real values stored in the physical file are.

是否有其他系统命令或免费提供的实用程序来显示数据的真实含义?我发现DSPF在调试中非常有用,并且希望能够看到字符和十六进制值(特别是对于打包的小数)的真正含义.我可以使用SQL来查看数据,但有时最好进行原始转储,特别是如果您正在使用SETLLCHAIN之类的RPG语句并且不想被SQL排序所误导.

Is there a different system command or freely available utility that shows what the data really is? I have found DSPF to be quite useful in debugging and would like to be able to see what the characters and hex values (especially for packed decimals) really are. I could use SQL to see the data, but sometimes it is better to get a raw dump, especially if you are using RPG statements like SETLL or CHAIN and don't want to be misled by SQL ordering.

推荐答案

DSPPFM显示不为null的字段的数据,并且为所有不为null的字段(默认为空白或零)显示默认值,但是您可以创建文件时,请设置其他默认值.

DSPPFM shows the data for fields that aren't null, and it shows the default value for any fields that are null, usually blanks or zeros, but you can set a different default value when you create the file.

这篇关于用包含空值的物理文件替代DSPF的好方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆