Here the input file and output files having record length 1000. I am adding an unique identifier '1' or '2' at position 1001 in INREC command to a block of records using group option and in the Out files based on the unique identifier I am writing to two different files.
But my sort card is giving error at Overlay command. Could you please help me to resolve.
The GROUP function works but not getting expected result because the Group function perform auto increment after writing one block of record. For example I have input file as below
I want to get only two output files will a block of records containing 'B0135101' in one file and the other one 'B0135102' in the second file. So the output file should be as below
Ok. In that case it will add '00' for both the groups containing the Key B0135101 and B0135102, since Header record for both starts with '00'. But I want to add different Group number for each set of group, then only I can write each group of record in separate file. Example I need something like below
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
This is a value: B0135101. This is the other: B0135102.
Those end in 1 and 2 respectively. You want 1 and 2 appended, respectively. So PUSH the final digit of that value.
I've no clue how you got the idea of using the record-type. Since it is the same for both your selection values, I don't see how you could have even imagined that would help.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
That could include RECORDS=4 (each group is shown in the example with four records) or END= for the 99 (if the groups actually aren't regular). Don't need to test the HEADER part, just the record-type.