Help in Sorting this

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Help in Sorting this

Postby Melvin_vt » Sun Jul 11, 2010 4:45 am

I want to get data from a file which has a record length of VBM 8230.

 BROWSE    Input File Line 000
 Command ===>
********************************* Top of Data ****************
     1         2         3         4         
<RESOURCES>>XXXX   !..AAA.A.......
<RESOURCES>>XXXX   !..AAA.AAB.... .......

We can receive different combinations and the sort should be able to check the no AAAAAAAAAAAAA and the char 'FFFF'.
And also all the time we need to have the Resources. The Resources are always fixed. The AAAAAAAAAAAAA and FFFF can keep on varying.

So this what I did


But with the above sort I can manage to get resources (ie <Resources>>XXXX) no AAAAAAAAAAAAAFFFF in the output file.

And when I use the sort below I get only AAAAAAAAAAAAAFFFF in the output no <RESOURCES>>XXXX.
//SYSIN    DD *

Please let me know how to get both of them in the same file.
Posts: 1
Joined: Sun Jul 11, 2010 3:56 am
Has thanked: 0 time
Been thanked: 0 time

Re: Help in Sorting this

Postby dick scherrer » Sun Jul 11, 2010 8:29 am

Hello and welcome to the forum,

Suggest you become familiar/comfortable with the "Code" tag which will preserve alignment and make the post more readable (your data and code have been "Code'd").

Also, when posting data, it is helpful (both for you and for us) to add "ruler" to show data positions.

It appears that the code expects RESOURCES in the wrong positions. It also appears that there may be problems with the parenthetical expressions - so the expected result does not happen.
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Help in Sorting this

Postby Frank Yaeger » Mon Jul 12, 2010 8:34 pm


Note that a VBM record looks like this:


where rrrr is the RDW in positions 1-4.
m is the machine control character in position 5.
data starts in position 6.

So you need to reevaluate your starting positions given that the data starts in position 6, not position 5.

As to what control statements you actually need, that depends on what exactly you're trying to do which you haven't explained well.
Show an example of the records in your input files and what you expect for output. Explain the "rules" for getting from input to output.
Frank Yaeger - DFSORT Development Team (IBM) -
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at
User avatar
Frank Yaeger
Global moderator
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times



  • Related topics
    Last post