Page 2 of 2
Posted: Wed Jul 20, 2011 1:23 pm
by raulravi
Hi Frank,
I am trying to run this JOb, becos i have to check the record from coloumn 20 to 301.
Code: Select all
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/301)
//SORTOUT DD DSN=... output file (FB/301)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(20,301
HEADER3=(1,301))
/*
But i am getting the following error.
Can you please help me out?
Code: Select all
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 09:18 ON WED JU
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(19,301
£
ICE007A 6 SYNTAX ERROR
HEADER3=(1,301))
£
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
ICE751I 0 C5-K51707 C6-K51707 C7-K54603 C8-K51707 E7-K51707
ICE052I 3 END OF DFSORT
Raul
Posted: Wed Jul 20, 2011 4:42 pm
by raulravi
Also please find the File details
Code: Select all
General Data Current Allocation
Management class . . : TESTSTD Allocated cylinders : 4,153
Storage class . . . : STANDARD Allocated extents . : 1
Volume serial . . . : T0Q1T4 +
Device type . . . . : 3390
Data class . . . . . : DB2CLASS
Organization . . . : PS Current Utilization
Record format . . . : FB Used cylinders . . : 4,153
Record length . . . : 301 Used extents . . . : 1
Block size . . . . : 27993
1st extent cylinders: 4153
Secondary cylinders : 500 Dates
Data set name type : EXTENDED Creation date . . . : 2011/07/11
SMS Compressible. . : YES Referenced date . . : 2011/07/20
Expiration date . . : ***None***
Posted: Wed Jul 20, 2011 10:27 pm
by Frank Yaeger
You have several problems including a missing comma and incorrect SECTION fields - too large and too far out. If I understand what you want, you can use these DFSORT control statements:
Code: Select all
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(20,256,276,26,
HEADER3=(1,301))
Posted: Thu Jul 21, 2011 9:06 am
by raulravi
Dear Frank,
I am still getting the error,
Code: Select all
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(20,256,276,26,
HEADER3=(1,301))
£
ICE223A F REPORT FIELD ERROR
ICE751I 0 C5-K51707 C6-K51707 C7-K54603 C8-K51707 E7-K51707
ICE052I 3 END OF DFSORT
What i am trying to do is ...
Code: Select all
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
2009-01-1310.43.11 0 1000000198<ADDRESS_LINE_1>>>>>>>>>>>>>>><ADDRESS_LINE_2
2008-04-2308.42.40 20102 1000000205<ADDRESS_LINE_1>>>>>>>>>>>>>>><ADDRESS_LINE_2
2008-04-1810.13.40-19854 1000000232<ADDRESS_LINE_1>>>>>>>>>>>>>>><ADDRESS_LINE_2
2008-11-0714.26.05 0 1000000731<ADDRESS_LINE_1>>>>>>>>>>>>>>><ADDRESS_LINE_2
From column 20 - 301, if the consecutive record's are same will remove the duplicate. Hope you remember, you gave me the solution for similar one.
Code: Select all
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,23,
HEADER3=(1,80))
This was worked well....., Can you please help me out & let me know what is the problem here with the bigger file. ?
Regards,
Raul
Posted: Fri Jul 22, 2011 1:31 am
by Frank Yaeger
You are missing the DFSORT PTF that allows header fields greater than 256 bytes, so you'll need to use:
HEADER3=(1,256,257,45)
Ask your System Programmer to install PTF UK90025 for z/OS DFSORT V1R10 or PTF UK90026 for z/OS DFSORT V1R12 (Oct, 2010) so you can use the newest DFSORT/ICETOOL functions.
Posted: Fri Jul 22, 2011 11:25 am
by raulravi
Thanks a lot frank, it worked.
Posted: Fri Jul 22, 2011 11:31 am
by raulravi
Hello Frank,
I have two files with different record length.
Code: Select all
Management class . . : TESTSTD
Storage class . . . : STANDARD
Volume serial . . . : TTQ1Z0 +
Device type . . . . : 3390
Data class . . . . . : DB2CLASS
Organization . . . : PS
Record format . . . : FB
Record length . . . : 308
Block size . . . . : 27720
1st extent cylinders: 500
Secondary cylinders : 500
Data set name type : EXTENDED
SMS Compressible. . : YES
file 2:
Management class . . : TESTSTD
Storage class . . . : STANDARD
Volume serial . . . : T0Q1T4 +
Device type . . . . : 3390
Data class . . . . . : DB2CLASS
Organization . . . : PS
Record format . . . : FB
Record length . . . : 301
Block size . . . . : 27993
1st extent cylinders: 4153
Secondary cylinders : 500
Data set name type : EXTENDED
SMS Compressible. . : YES
can you please let me know how to merge them. One column in file 1 is more than file2. I want the output file with all the column's. (Lrec = 308).
thanks,
Raul
Posted: Fri Jul 22, 2011 1:30 pm
by raulravi
For example
Code: Select all
File1:
Date time Operatorid Cust-id Field-1 Field-2
01/01/201111:11:11 aaaaaa 111111 asa sas
01/01/201011:11:11 aaaaaa 111111 asa sas
File2:
Date time Cust-id Field-1 Field-2
01/01/200911:11:11 111111 asa sas
01/01/200811:11:11 222222 asa sas
Output file:
Date time Operatorid Cust-id Field-1 Field-2
01/01/201111:11:11 aaaaaa 111111 asa sas
01/01/201011:11:11 aaaaaa 111111 asa sas
01/01/200911:11:11 111111 asa sas
01/01/200811:11:11 222222 asa sas
Posted: Fri Jul 22, 2011 10:26 pm
by Frank Yaeger
What is the starting position of Cust-id, Field-1 and Field-2 in file1?
What is the starting position of Cust-id, Field-1 and Field-2 in file2?
Do you just want to copy the file2 records after the file1 records in the output file (that's not a "merge", it's a MOD)?
Posted: Mon Jul 25, 2011 9:24 am
by raulravi
starting position of Cust-id = 26, Field-1 = 36 and Field-2 =51 and so on till 308 in file1. Can we take it as one string ( from 36 to 308) ?
starting position of Cust-id = 20, Field-1 = 30 and Field-2 =46 and so on till 301 in file2. Can we take it as one string ( from 30 to 301) ?
the files are same, but File1 have an additional field called Operator-is. So when we combine both the feilds. As you said it is MOD. And in the output file we have to get all the column's including operator -id for all the rows.
I guess i am clear. Please let me know if not.
Raul
Posted: Tue Jul 26, 2011 1:03 am
by Frank Yaeger
You can use a DFSORT/ICETOOL job something like this (I'm not sure if I understood the positions just right as you described them, but you can adjust as needed):
Code: Select all
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/308)
//IN2 DD DSN=... input file2 (FB/301)
//OUT DD DISP=MOD,DSN=... output file (FB/308)
//TOOLIN DD *
COPY FROM(IN1) TO(OUT)
COPY FROM(IN2) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
INREC BUILD=(1,19,26:20,282)
/*
Posted: Wed Jul 27, 2011 10:57 am
by raulravi
Frank,
I have a input file as below.
Code: Select all
Input file:
Date feild2&3custid FLD-1 FLD-2 FLD-3
20110101 111111 london Real Fraud
20101201 111111 Madrid Real Fraud
20101101 111111 london Real Fraud
20110101 222222 Madrid Real Fraud
20101201 222222 london Real Fraud
20101101 222222 Madrid Real Fraud
20101101 333333 Madrid Real Fraud
1) I have to write the first record of every customer as it is.
2) And again write the first record as it is, but with date from the below
record if the customer is same for both the records.
3) And delete the last record of a customer.
4) But if there is only one record for a customer then write it down to the
output.
the output file should be as below:
Code: Select all
Output file:
Date feild2&3custid FLD-1 FLD-2 FLD-3
20110101 111111 london Real Fraud
20111201 111111 london Real Fraud
20101101 111111 Madrid Real Fraud
20110101 222222 Madrid Real Fraud
20111201 222222 Madrid Real Fraud
20101101 222222 london Real Fraud
20101101 333333 Madrid Real Fraud
Can you please help me out at this.
Raul
Posted: Thu Jul 28, 2011 12:41 am
by Frank Yaeger
Sorry, but I don't understand your rules as described. Perhaps a larger set of input records (with different variations of two customer id records, three customer id records, four customer id records) and expected output records would help.
At any rate, I'm locking this thread since you seem to be using it for every new unrelated question you have. Please start a new Topic for each new unrelated question.