Search found 21 matches

by bernix
Thu Oct 22, 2015 5:26 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: joinkeys in sort
Replies: 2
Views: 5253

JOINKEYS F1=IN1,FIELDS= <position of common key in file1>
JOINKEYS F2=IN2,FIELDS=<position of common key in file2>
REFORMAT FIELDS=(F1: <fields of file1>,F2: <fields of files2> )
OPTION COPY
END

(if you have variable length records you need a RDW as well
by bernix
Thu Oct 22, 2015 5:03 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: compare date DFSORT
Replies: 0
Views: 2318

compare date DFSORT

hi all, i need to compare a date value yyyy-mm-dd with december 31st of the year before last year. to be precise: today i use IFTHEN=(WHEN=(WPTYP,EQ,C'Z',AND,DATUM,GE,C'2013-12-31'), OVERLAY=(1:C'K')), I want to amend the statement that if i run the job next year it will be compared with '2014-12-31...
by bernix
Fri Nov 08, 2013 7:57 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: splitting records
Replies: 0
Views: 1799

splitting records

nice problem to split a given record into multiple records with retaining a key

INPUT:
KEY1AAABBBCCC
KEY2DDDEEEFFF

OUTPUT:
KEY1AAA
KEY1BBB
KEY1CCC
KEY2DDD
KEY2EEE
KEY2FFF

solutions welcome :lol:
by bernix
Tue Apr 30, 2013 5:53 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: Retiring after 43+ years with IBM
Replies: 3
Views: 6738

Thanks for all the help Frank. Enjoy your retirement !!!
by bernix
Wed Oct 24, 2012 6:08 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: modify date conditionally
Replies: 7
Views: 8242

thank you william, your hint (WHEN=GROUP) was sufficient to assemble the statements that performed the job. i considered the manual and BINGO!
by bernix
Wed Oct 24, 2012 5:21 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: modify date conditionally
Replies: 7
Views: 8242

Please post the ICE201I message from any Sort step so we can see what level of the product you have. It should be simple with a IFTHEN=(WHEN=GROUP on the header record, and PUSH the date from the header. Then you have functions for the current date (consult the manual) if you want all the confusion...
by bernix
Wed Oct 24, 2012 3:44 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: modify date conditionally
Replies: 7
Views: 8242

thanks but i dont need a program code, i'd like to have a DFSORT solution :D
by bernix
Wed Oct 24, 2012 1:44 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: modify date conditionally
Replies: 7
Views: 8242

modify date conditionally

My file has a header record containing a date and data records. My task is to modify the date in the data records to current-date but only if the date is the same as in the header record. As that is a little confusing I will give an example 00 is the header record 01 are the data records today is 20...
by bernix
Thu Feb 16, 2012 4:46 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: sorting trailer to header
Replies: 2
Views: 4089

yes there is an identifier, file is variable. i found a solution: INREC IFTHEN=(WHEN=(5,7,CH,EQ,C'XXXXXXX'),BUILD=(1,4,C'00000000',5)), IFTHEN=(WHEN=(5,7,CH,NE,C'XXXXXXX'),BUILD=(1,4,SEQNUM,8,ZD,5)) SORT FIELDS=(5,8,CH,A) OUTREC BUILD=(1,4,...
by bernix
Wed Feb 15, 2012 2:20 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: sorting trailer to header
Replies: 2
Views: 4089

sorting trailer to header

hi,

i have a file with a trailer record that i'd like to have as header record

input:
aaa
bbb
ccc
trailer

ouput:
trailer
aaa
bbb
ccc

is this possible in one step?
by bernix
Wed Dec 07, 2011 7:55 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: reformat comparism results
Replies: 2
Views: 4145

thanks for your help !
by bernix
Tue Dec 06, 2011 7:58 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: reformat comparism results
Replies: 2
Views: 4145

reformat comparism results

i have compared the content of 2 files and reformated the differences. now i've got a file that looks like (records are in sorted order) AAA0010 AAA0015 BBB0000 BBB0100 CCC1200 CCC0100 i'd like to submit to my business partner a file that looks like AAA;0010;0015 BBB;0000;0100 CCC;1200;0100 any sugg...
by bernix
Fri Apr 01, 2011 1:33 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: Another daunting task
Replies: 3
Views: 6031

I included the record you mentioned because it is younger than 2011-02-28 but still i got the idea and i amended your DFSORT to JOINKEYS F1=IN1,FIELDS=(1,3,A) JOINKEYS F2=IN2,FIELDS=(11,3,A) JOIN UNPAIRED,F2 REFORMAT FIELDS=(F2:1,13,F1:1,3) OPTION COPY OUTFIL INCLUDE=(...
by bernix
Thu Mar 31, 2011 2:32 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: Another daunting task
Replies: 3
Views: 6031

Another daunting task

I've got 2 Files with a common key. One file additionally has a date Example File 1 AAA DDD EEE File 2 2011-03-01AAA 2011-02-01AAA 2011-01-01AAA 2010-12-01AAA 2011-01-01BBB 2011-03-01BBB 2011-02-01CCC 2011-01-01CCC 2010-12-01CCC 2010-03-01EEE My task is to create a file with records of File2 that - ...
by bernix
Wed Mar 30, 2011 2:50 pm
Forum: DFSORT , ICETOOL & Utilities
Topic: "UNMERGE"
Replies: 7
Views: 11441

job works fine. thanks for your help Frank