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

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

Postby priyasingh » Mon Oct 15, 2012 4:33 pm

I have two input files each having header date of format YYYY-MM-DD at column 16. i need to compare both fdates and if date from 1st file is greater than the date from second file then a temp PS file will be created. Plz help me on this.
Thanks
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

 

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

Postby BillyBoyo » Mon Oct 15, 2012 4:40 pm

What is the relationship to the "temp PS"? Created from the data of one of the files, or something completely external to the process?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

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

Postby priyasingh » Mon Oct 15, 2012 5:28 pm

that temp file will be empty only. on based on that temp file i'll trigger a net in the OPC. I just need the JCL code for that comparison.
Thanks
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 5:39 pm

Can you post the ICE201I message from a Sort step, please?

I'm not clear about what you mean about the temporary file. If you define a new dataset in the JCL it will be cataloged (if you tell it) irrespective of what goes on in your program.

You can use JOINKEYS on the first records of each file and then do the date compare. You could arrange to set an RC of non-zero by no record written to an output file for whichever condition you choose. Would that do?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

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

Postby priyasingh » Mon Oct 15, 2012 5:55 pm

ok leave the part of temp file, can i have the my JCL like if date from first file is greater than date from second file then the job will ended with RC00 otherwise with RC08
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 NicC » Mon Oct 15, 2012 6:16 pm

JCL can NOT do what yuou want! JCL is for specifying what program you want to run and what datasets that program needs. It has nothing to do with controlling the program itself or specifying what the program is to do. I guess you want DFSort CONTROL cards as you have posted in the DFSort part of the forum. IF you really want JCL then what is required for DFSort is in the DFSort Getting Started manual.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

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

Postby priyasingh » Mon Oct 15, 2012 6:33 pm

am really sorry for that. yes i want DFsort control card for it.
Thanks
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 priyasingh » Mon Oct 15, 2012 9:49 pm

plz reply if anybody knows about it
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 Akatsukami » Mon Oct 15, 2012 9:57 pm

Priya-chan, as you purport to know PL/I, would it not be quicker to write the very trivial program needed to do this rather than solicit for sort control 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: 1053
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 priyasingh » Mon Oct 15, 2012 9:58 pm

i need it in JCL only. Plz help. I need it urgently
priyasingh
 
Posts: 9
Joined: Mon Oct 15, 2012 4:19 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post