View previous topic :: View next topic
|
Author |
Message |
David Sde
New User
Joined: 24 Apr 2011 Posts: 23 Location: USA
|
|
|
|
Hi,
I know this is really an ISPF question, but I'm thinking that perhaps a DFSORT expert might have a solution.
When browsing (or viewing, or editing) a dataset of variable-length records, the COLS command shows the first data byte as being in column 1. However, as we know, DFSORT treats the first data byte in a variable-length record as starting in column 5. Is there any way to either a) show the RDW of each record so it appears starting in column 1, or b) tell the COLS command to treat the first column number as column 5?
It would be enormously helpful for debugging DFSORT applications if an input (or output) VB dataset could be viewed in ISPF with the "correct" column number (from DFSORT's perspective) above each byte.
If anyone has another solution or approach to this problem, I would love to know. Thank you!
David |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
David Sde,
With DFSORT We can build the VB dataset with RDW displayed in the first byte but then your LRECL would increase by 4 bytes. If you want it that way I can show you a way to do that. |
|
Back to top |
|
|
David Sde
New User
Joined: 24 Apr 2011 Posts: 23 Location: USA
|
|
|
|
Kolusu,
Thank you very much for the reply. I think that changing the LRECL would add other issues, so I probably should look for another approach (I might just have to keep remembering to add 4 to the displayed column number!)
David |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Don't you have the same problem looking files used by COBOL (or whatever) programs?
No? Because you use something which shows the data using the record-layout?
Then look at the use of DFSORT Symbols. A rexx program is supplied to convert a COBOL layout to DFSORT symbols.
Then you don't need to know about positions and columns again/so much.
Then if you do, you can always look at the output on SYMNOUT and get them, but have them associated with a name. |
|
Back to top |
|
|
David Sde
New User
Joined: 24 Apr 2011 Posts: 23 Location: USA
|
|
|
|
Bill,
We have many DFSORT/ICETOOL applications, and every one of them uses symbols.
I had a bug in my most recent ICETOOL application. I had created a SYMNAMES dataset describing a preexisting record layout. My error was that I accidentally omitted a SKIP,8 statement (corresponding to a filler field). As a result, a subsequent JOINKEYS on that dataset yielded no output records. To find the problem, I looked at the DFSMSG dataset to see what actual column numbers were generated by DFSORT in the JOINKEYS statement. I opened the input dataset in ISPF =1, and issued a COLS command. When I realized that the data was not where DFSORT expected it to be, I found my bug. What was annoying was that the column numbers were off by 4 (from DFSORT's perspective) because of the RDW.
I believe that it would be handy if the COLS command had an option to show the column numbers in the VB dataset from DFSORT's perspective. That would have made my checking a little easier. Hence my original question.
I could have debugged the problem by looking at the SYMNOUT dataset, at which point I might have observed that the column numbers were off by 8, starting at the point where I missed the SKIP,8. But I didn't happen to take that approach.
David |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You could always write a simple edit macro to insert a note line with a ruler |
|
Back to top |
|
|
David Sde
New User
Joined: 24 Apr 2011 Posts: 23 Location: USA
|
|
|
|
Enrico,
Yes... that's a great idea. Thank you!
David |
|
Back to top |
|
|
|