Hi Everyone,
I am facing a problem in SORT program. The input file is VBA format. I have included a condition to omit the records, which have spaces in byte position number 3 to 23. But still I found records in output file, which have spaces in byte number 3 to 23.
I am not able to find any clue to solve this problem.
It will be very kind of you if you give some suggestion to solve this issue.
Hi
I have tried taking other simple example. But still I face same problem.
1) I create 1 dataset with VB formate.
2) I enter three records as follow:
Code:
****** ***************** Top of Data ******************
000001 1 FIRST RECORD
000002
000003 3 ITS HAS DATA IN THIS LINE
****** **************** Bottom of Data ****************
Here,
1st record: I place 1 in first byte and spaces from 5th position to 10th.
2nd Record: I placed spaces for this record.
3rd record : I place some data in byte posituin 5 to 10.
I got following output in output dataset:
Code:
****** ***************** Top of Data ******************
000001
000002 3 ITS HAS DATA IN THIS LINE
****** **************** Bottom of Data ****************
The first record in input file have same data in the 1 st byte. but it has sapces from byte number 5 to 10. so it got excluded. But for the second records it has only space for whole records but this reord is not excluded in the output file.
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
As I tried to tell you, record 2 is probably short and doesn't actually have "blanks". The variable records have the trailing blanks truncated even though ISPF EDIT displays that way with HEX ON.
Try adding a character on record 2 in position 24. That will actually leave blanks in the bytes between. Now run your sort.
To omit the short, blank lines you'd need to test the RDW in bytes 1-4 for a value of 5 or less (RDW + prtctl char).
Hi Bill,
I got your points. Thank you for your help.
When I tried checking for space in 1st byte position ( 5=RWD+1). It actually excluded the records with space.
like:
Code:
OMIT COND=(05,01,CH,EQ,C' ')
But now I am facing another problem as it got impacted in other records which have space in 1st byte (1+4=5) but actually have some data in other byte say from 20 to 30 byte position.
In this case is there any way to handle this issue in sort.