I am using the below sort card for converting the packed field to numeric and also i am removing the duplicates and writing it to the separate file.
I tried with the single step, in that case i got my output file (Without duplicates) perfectly..i.e, packed field is converted to numeric. But i didnt get my duplicate file correctly.i.e.data is still packed!!
But is there anyway to do this in a single step (instead of two steps here).
We are using SYNCSORT in our shop!!
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
since the omit function is during the sort,
i imagine if you converted during INREC (and change your sort fields parm)
your duplicate file would probably have the conversions also.
since the omit function is during the sort,
i imagine if you converted during INREC (and change your sort fields parm)
your duplicate file would probably have the conversions also.
i got the duplicated records as numeric (packed to numeric). But in the first file where i will get records, without duplicates , in this file, i got empty records..So i think we cannot do this in a single step in SYNCSORT.
Since you are now converting your data using INREC, which occurs before SORT processing, you must modify your SORT control statement to reflect the newly modified field. Try this:
I got the following error after changing the Sort card which u gave..
Code:
SYSIN :
SORT FIELDS=(1,11,ZD,A)
SUM FIELDS=NONE,XSUM
INREC FIELDS=(1:1,6,PD,EDIT=(TTTTTTTTTTT),
12:7,6,PD,EDIT=(TTTTTTTTTTT),23,10)
WER276B SYSDIAG= 161394, 3122691, 3122691, 4413179
WER164B 10,840K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 1,004K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 22; BLKSIZE= 32758
WER230A INREC FIELD OUTSIDE RANGE
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
Whati want is...
i want to convert the fields from packed to numeric and write to the output file and also i want to write the duplicates in separate file. Here i got the first output file (without duplicates) in a correct format. But in duplicate file,i got the records as packed, which is not expected!!
I used your sample data inline (DD *), which creates an 80-byte record. That is probably why I did not get the error. Based on the data I saw, I believe you want to modify your INREC statement as follows: