witsche
New User
Joined: 04 May 2005 Posts: 3
|
|
|
|
Hi all,
I have to match two datasets (FB200) and:
- if the key is present only in the first dataset, I have to write the record in AM28.DOP0GF.TS000.CONTRADI.GFMBF manipulating data
- if the key is present only in the second dataset, I have to write the record as is in AM28.DOP0GF.TS000.CONTRADI.GFMBF
- if the key is present on both datasets, I have to subtract dataset2.campoA from dataset1.campoA: if the result is >= 0 I have to write a record in AM28.DOP0GF.TS000.CONTRADI.GFMBF inserting the result of subtracting in a certain position; if the result is < 0 I have to write a record in AM28.DOP0GF.TS000.CONTRADI.GFMBF inserting the subtraction result in a certain position.
This is the step that I wrote:
Code: |
//P060 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//*--- INPUT
//SORTJNF1 DD DISP=SHR,DSN=AM28.DOP0GF.TS000.CONTRADI.GFMBF.OUT20A
//SORTJNF2 DD DISP=SHR,DSN=AM28.DOP0GF.TS000.CONTRADI.GFMBF.OUT20B
//*--- OUTPUT
//F12 DD DSN=AM28.DOP0GF.TS000.CONTRADI.GFMBF,
// DISP=MOD
//F01 DD DSN=AM28.DOP0GF.TS000.CONTRADI.GFMBF,
// DISP=MOD
//F02 DD DSN=AM28.DOP0GF.TS000.CONTRADI.GFMBF,
// DISP=MOD
//*
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(65,17,CH,A)
JOINKEYS FILE=F2,FIELDS=(65,17,CH,A)
JOIN UNPAIRED,F1,F2
REFORMAT FIELDS=(F1:01,200,F2:01,200,?)
SORT FIELDS=COPY
OUTFIL FNAMES=F01,INCLUDE=(401,1,CH,EQ,C'1'),
BUILD=(1,145,164,18,C'000000000000000000',182,19)
OUTFIL FNAMES=F02,INCLUDE=(401,1,CH,EQ,C'2'),
BUILD=(201,200)
OUTFIL FNAMES=F12,INCLUDE=(401,1,CH,EQ,C'B'),
IFTHEN(WHEN=((164,18,ZD,SUB,364,18,ZD),GE,0),
BUILD=(1,145,164,18,(164,18,ZD,SUB,364,18,ZD),
C'000000000000000000',182,19)),
IFTHEN(WHEN=NONE,
BUILD=(1,145,164,18,C'000000000000000000',
(164,18,ZD,SUB,364,18,ZD),182,19))
/*
|
and I get this error:
Code: |
OUTFIL FNAMES=F12,INCLUDE=(401,1,CH,EQ,C'B'),
IFTHEN(WHEN=((164,18,ZD,SUB,364,18,ZD),GE,0),
*
BUILD=(1,145,164,18,(164,18,ZD,SUB,364,18,ZD),
C'000000000000000000',182,19)),
IFTHEN(WHEN=NONE,
BUILD=(1,145,164,18,C'000000000000000000',
(164,18,ZD,SUB,364,18,ZD),182,19))
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER903I SYNCSORT 2.1.0.0 IS NOT LICENSED FOR SERIAL 31BE7, TYPE 2964 718, LPAR
WER903I PRODUCT WILL STOP WORKING IN 44 DAYS UNLESS A VALID KEY IS INSTALLED.
WER251A INCLUDE/OMIT INVALID COND
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
|
is there a syntax error or, with the sort, I can not do what previously described?
the output dataset was previously allocated.
thank you |
|