Plz help:need JCL to compare date field from two files



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

Re: Plz help:need JCL to compare date field from two files

Postby Akatsukami » Mon Oct 15, 2012 10:10 pm

:: sigh :: This is the second time that you are told that DFSORT ≠ JCL.

Now, tell us about this moronic team lead of yours who slobbers that you may take a day to beg for sort control cards that you cannot devise for yourself, but may not take an hour to write a PL/I program that you can, and it may be that Mr Kolusu or someone else will have pity on you and give you the cards.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Plz help:need JCL to compare date field from two files

Postby skolusu » Mon Oct 15, 2012 10:16 pm

priyasingh wrote:i need it in JCL only. Plz help. I need it urgently


Everyone does NOT work in the same timezone as you are working and please stop demanding solution. You neither provided the LRECL and RECFM of the input files involved nor you showed a sample of input and desired output, but you do demand a complete solution .

Use the following DFSORT JCL which will give you the desired results. I assumed that your input is RECFM=FB and LRECL=80
//STEP0100 EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                           
//INA      DD *                                 
RECORD # 1     2012-10-16                       
//INB      DD *                                 
RECORD # 2     2012-10-15                       
//SORTOUT  DD SYSOUT=*                           
//SYSIN    DD *                                 
  OPTION COPY                                   
  JOINKEYS F1=INA,FIELDS=(81,8,A)               
  JOINKEYS F2=INB,FIELDS=(81,8,A)               
  JOIN UNPAIRED                                 
  REFORMAT FIELDS=(F1:1,80,?)                   
  INCLUDE COND=(81,1,CH,EQ,C'1')                 
  INREC BUILD=(1,80)                             
//*                                             
//JNF1CNTL DD *                                 
  OPTION STOPAFT=1                               
  INREC OVERLAY=(81:16,10,UFF,M11,LENGTH=8)     
//*                                             
//JNF2CNTL DD *                                 
  OPTION STOPAFT=1                               
  INREC OVERLAY=(81:16,10,UFF,M11,LENGTH=8)     
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Plz help:need JCL to compare date field from two files

Postby BillyBoyo » Mon Oct 15, 2012 10:18 pm

If you look in the manual, you'll find the RC=8 is tough. You can have 12 :-)

//STEP0100 EXEC PGM=SORT
//CHKOUT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  OPTION COPY
  JOINKEYS F1=INA,FIELDS=(81,1,A),SORTED,NOSEQCK
  JOINKEYS F2=INB,FIELDS=(81,1,A),SORTED,NOSEQCK
  REFORMAT FIELDS=(F1:16,10,F2:16,10)
  OUTFIL FNAMES=CHKOUT,NULLOFL=RC4,INCLUDE=(1,10,CH,LT,11,10,CH)
//JNF1CNTL DD *
 OPTION COPY,STOPAFT=1
 INREC OVERLAY=(81:C'1')
//JNF2CNTL DD *
 OPTION COPY,STOPAFT=1
 INREC OVERLAY=(81:C'1')
//INA      DD *
XXXXX           2012-MM-DD
2222
3333
4444
5555
6666
7777
//INB      DD *
XXXXX           2012-MM-DD
11111
77777


Ah... I'm "crossing in the post...", I see...
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Plz help:need JCL to compare date field from two files

Postby enrico-sorichetti » Mon Oct 15, 2012 10:22 pm

i need it in JCL only. Plz help. I need it urgently


if You need it urgently a forum is not the best place to ask,
as You know we reply on our own time and free of charge

You can ask people to accommodate Your time constraints only if You pay them :mrgreen:
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: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Plz help:need JCL to compare date field from two files

Postby priyasingh » Mon Oct 15, 2012 10:29 pm

thanks enrico,but i didnt ask that its compulsary for you to reply for my post.
priyasingh
 
Posts: 9
Joined: Mon Oct 15, 2012 4:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Plz help:need JCL to compare date field from two files

Postby BillyBoyo » Mon Oct 15, 2012 10:35 pm

You've got two solutions. Now you're moaning about it?

I'll make the same point as the other two. If you have to do something quickly, you have to it in something you know. Or you have to pay someone to do it in what you want.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Plz help:need JCL to compare date field from two files

Postby BillyBoyo » Tue Oct 16, 2012 12:12 am

You have been given two solutions. Did you try either of them? Or did you just rely on contacting me directly? Doesn't work that way, not without payment, anyway.

Try the solutions. Let us know.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Plz help:need JCL to compare date field from two files

Postby dick scherrer » Tue Oct 16, 2012 8:50 am

Hello,

thanks enrico,but i didnt ask that its compulsary for you to reply for my post.
No, you didn't. However, ypu will frequently receive replies that were not exactly what you were looking for.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Previous

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post