Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Thu Jul 08, 2010 10:37 am Post subject:
shyamsaravan,
why are you having different qualifiers for the dataset names? in the first post you showed all of them to be the same HLQ and all you need to pick the latest version. Btw I get a return code of zero for the job if I use the data as instream data. Show me the JESJCL sysout from the job. which will show the error you are having. What is the LRECL and RECFM of the input file? _________________ Kolusu
www.linkedin.com/in/kolusu
Joined: 12 May 2010 Posts: 44 Topics: 12 Location: India
Posted: Fri Jul 09, 2010 6:22 am Post subject:
Our internal program creates the output file and send to the inbuilt mailbox,The mailbox generates the below files periodically
My requirement is the new jcl directly has to check which is the highest last qualifier file and need to copy all the records to another output file(LRECL=88,RECFM=FB)
Input file also has same DCB,like (LRECL=88,RECFM=FB)
So,we dont know which one is the highest last qualifier file while the New JCL runs,so that we cant give the correct input file in the SORTIN.The system has to fetch the highest last qualifier file directly to the SORTIN
My mailbox has the below files
NORTHWEST is a mailbox name
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Fri Jul 09, 2010 9:17 am Post subject:
From your second job...
Quote:
DSN=01TRAILER 001116 000015 172748 00000 17280
Your first job worked but you supplied it with the wrong file - it wants the list of dataset names from which you want the first job to pick the latest. You have supplied the latest file and the trailer record has been extracted and inserted into the second job as a dataset name. _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Fri Jul 09, 2010 10:32 am Post subject:
shyamsaravan,
Unless you have a way to distinguish which is the latest file, you are not guaranteed to pick the right file. So you need to find a filed or flag which identifies the latest file. _________________ Kolusu
www.linkedin.com/in/kolusu
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Fri Jul 09, 2010 1:43 pm Post subject:
This task is very straight forward using Rexx instead of SORT, especially if you already have the data set names (though getting them in Rexx is only a little code). Rexx is a scripting language and what you are asking for is a script. I'd suggest using the right tool for the task rather than picking the tool and then describing the task. _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
All times are GMT - 5 Hours Goto page Previous1, 2
Page 2 of 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum