Sort Card required for DFSORT V1R10



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

Sort Card required for DFSORT V1R10

Postby Prasanna G » Sun Nov 11, 2012 8:42 pm

Hi

Right now we have the below sort card in test region for sorting input file of length 34 with a header and trailer.

SORT FIELDS=(1,2,BI,A)
OUTFIL INCLUDE=(1,2,BI,NE,0),
IFTRAIL=(HD=YES,TRLID=(1,2,BI,EQ,999),
TRLUPD=(11:COUNT=(TO=BI,LENGTH=04)))


As we do not have DFSORT V1R12 in production, we have been asked to modify the sort card to work in DFSORT V1R10.
Can someone please help me with a right sort card?

Thanks
Prasanna G
User avatar
Prasanna G
 
Posts: 59
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Sort Card required for DFSORT V1R10

 

Re: Sort Card required for DFSORT V1R10

Postby enrico-sorichetti » Mon Nov 12, 2012 1:31 am

You should realize that people willing to help might not be at the 1.12 level,
so it would necessary for them to spend time looking at the manuals to decode the syntax
to backtrack to the requirement

it would have been nicer from Your side to have posted
a description in WORDS of the requirement,
a snippet of the input data
and the corresponding snippet of the expected output
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2644
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Sort Card required for DFSORT V1R10

Postby Prasanna G » Mon Nov 12, 2012 4:45 am

Hi Enricho

My requirement is as follows
There is an input file with header identified with first two bytes as zero (s9(04 ) comp), then detailed record with first two bytes as a non zero value (partition number s9(04) comp) then trailer record as 999 as the first two bytes with record count starting at position 11 (s9(09) comp). The record length of the file is 34. I have to concatenate 2 input files and get output file with one header, set of detailed records sorted in ascending order using first 2 bytes then trailer updated with correct record count from the two files. I tried to arrive at the below sort card to work in V1.R10. But not yielding the result :-( as I am not much familiar with DFSORT.

SORT FIELDS=(1,2,BI,A)
INCLUDE COND=(1,2,BI,NE,0)
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(35:SEQNUM,04,BI)),
IFTHEN=(WHEN=(1,2,PD,EQ,999),
  OVERLAY=(11:35,04,BI,SUB,2,TO=BI,LENGTH=04))


The output file that I get is not having header record. It gives me two 999 records at the end.
Quick response will be very much helpful as we have a code move up tonight.

Thanks in advance
Prasanna G.
User avatar
Prasanna G
 
Posts: 59
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Sort Card required for DFSORT V1R10

Postby BillyBoyo » Mon Nov 12, 2012 5:21 am

Well you are ignoring the header record(s) in the INCLUDE.

If you get two 999 records on the output, that is because there are two on the input - one from each concatenated file? So if you keep the headers, you'll probably have two of those as well.

If the two headers are correct and the two trailers are correct, then you could assign a sequence number with OUTREC (after the data is sorted) for headers and trailers and then with OUTFIL INCLUDE write all the data records, but a header or trailer only when the sequence number is one.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Sort Card required for DFSORT V1R10

Postby enrico-sorichetti » Mon Nov 12, 2012 5:32 am

first of all learn to spell correctly people name
my name is Enrico, NOT Enricho :evil:

second
Quick response will be very much helpful as we have a code move up tonight.

a Forum is not the best place to ask if You have any time constraint..
You cannot expect people to drop what they are doing to start working on Your requirement :geek:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2644
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Sort Card required for DFSORT V1R10

Postby BillyBoyo » Mon Nov 12, 2012 6:02 am

How did someone manage to write code which plain does not work with the DFSORT in Production?

Having done that, how come no-one found out until 24 hours before the code goes into Production?

Something hasn't been thought through somewhere with this. How are you planning to do satisfactory testing? Are there any other sort steps being implemented, have they been checked?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Sort Card required for DFSORT V1R10

Postby Prasanna G » Mon Nov 12, 2012 6:12 am

We have DFSORT V1.R12 in test regions. We were not aware that V1R12 will not be available in production. There was an implementation happened last Friday. One of the instances had V1.R12 where as some other instances do not. So to avoid that we have been asked to update the sort card in such a way that it runs for V1R10.
User avatar
Prasanna G
 
Posts: 59
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Sort Card required for DFSORT V1R10

Postby Prasanna G » Mon Nov 12, 2012 6:15 am

enrico-sorichetti wrote:first of all learn to spell correctly people name
my name is Enrico, NOT Enricho :evil:

second
Quick response will be very much helpful as we have a code move up tonight.

a Forum is not the best place to ask if You have any time constraint..
You cannot expect people to drop what they are doing to start working on Your requirement :geek:


Hi

Am extremely sorry for wrongly spelling your name.
As I am new to DFSORT, I tried to come up with above sort card. But could not get it right. Hence wanted a quick response.

Thanks ENRICO :)
Regards
Prasanna G.
User avatar
Prasanna G
 
Posts: 59
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Sort Card required for DFSORT V1R10

Postby Prasanna G » Mon Nov 12, 2012 6:17 am

BillyBoyo wrote:Well you are ignoring the header record(s) in the INCLUDE.

If you get two 999 records on the output, that is because there are two on the input - one from each concatenated file? So if you keep the headers, you'll probably have two of those as well.

If the two headers are correct and the two trailers are correct, then you could assign a sequence number with OUTREC (after the data is sorted) for headers and trailers and then with OUTFIL INCLUDE write all the data records, but a header or trailer only when the sequence number is one.


Thanks.
But how about updating the trailer record with correct trailer count?
Can you help me with that?

Prasanna G.
User avatar
Prasanna G
 
Posts: 59
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Sort Card required for DFSORT V1R10

Postby dick scherrer » Mon Nov 12, 2012 6:32 am

Hello,

It would have been much more helpful if you had shown some sample input and the output you wanted when you rn your process.

You now mention a "trailer". DFSORT can generate a trailer, but we would need to know what it should contain. Maybe i've misread or i'm old and work better with actual data . . . Read sbout TRAILER1 and COUNT=.

Some of us should be available for a while yet . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Next

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post