I have a sort code that compares 2 files using JOIN KEYS and I create a reformatted output file that would take some fields from file 1 and some from file 2. Following is the code that I am using:
In the above mentioned code I am taking a 19 byte field from the 13th position of file2 and all the remaining bytes from file1. But I have an extra condition to be added:
If the 19th byte starting from the 13th position in file2 is spaces then I need to take the same position from file1
Can somebody please help me in adding the condition
If you see the output of my existing code bytes 13-31 alone have been taken from file2 irrespective of it containing a value or a blank.
What I need help on is to populate the 13-31 bytes from file2 only if there is a valid value present. IF positions 13-31 in file2 is spaces then i have to populate the output file from file1 positions 13-31. So the output should be
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Please re-post the input and output data without all of the dashes. Also, make sure the data is the proper length. The data posted does not always appear to match the specified length.
If you both "Code" the data as well as present it similar to data shown with COLS in tso/ispf, you can get something like:
Code:
1 2
....+....0....+....0
903456more
Use the Preview to check how your post will appear to toe forum. After you Preview and are satisfied with the post, click Submit.