I was trying using IF THEN & OVERLAY. But didn't succeeded.
Requirement:
Input file:
1121003 2020-09-23T15:21:16-05:00 #Error:
1121003 -------------------------------------------------
1121003 Driver Files Does not exist
1121003 -------------------------------------------------
2609111 2020-10-11T15:21:16-05:00 #Error:
2609111 -------------------------------------------------
2609111 Driver Files Does not exist
2609111 -------------------------------------------------
2609112 2020-10-12T15:21:16-05:00 #Error:
2609112 -------------------------------------------------
2609112 Driver Files Does not exist
Output:
The timestamp value must be copied from above record and placed in 2nd rec for same group id(first 7bytes field)
1121003 2020-09-23T15:21:16-05:00 #Error:
1121003 2020-09-23T15:21:16-05:00 -----------------
1121003 2020-09-23T15:21:16-05:00 Driver Files Does not exist
1121003 2020-09-23T15:21:16-05:00 -----------------
2609111 2020-10-11T15:21:16-05:00 #Error:
2609111 2020-10-11T15:21:16-05:00 ----------------
2609111 2020-10-11T15:21:16-05:00 Driver Files Does not exist
2609111 2020-10-11T15:21:16-05:00 -----------------
2609112 2020-10-12T15:21:16-05:00 #Error:
2609112 2020-10-12T15:21:16-05:00 ----------------
2609112 2020-10-12T15:21:16-05:00 Driver Files Does not exist
2609112 2020-10-12T15:21:16-05:00 ----------------
Can any one please help me in getting the above output.
tried in many ways using IFTHEN method but didn't get the expected one.
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
A) Why have you not used the code tags?
B) Why have you not shown the control statements that did not work? Without them we do not know what you tried and therefore we do not know how to fix them.
It’s been 15 years for you on the forum and don’t use the code tags. In your last post I requested you to use it but you did not act on that , this is another post and you did the same . Going forward go to the Rules on the top section and it is explained how to use the code tags.
Similar question has been asked so many times in past , did you search before posting if not then please do some research and you will get the answer why it’s not working.
There is something exists called IFTHEN=GROUP,KEYBEGIN=(),.. PUSH=() use that and BUILD the record in next IFTHEN.
Or use a JOINKEYS and reformat.
Apologies for not using Code tags, just did it in hurry.
Will provide my code which is not working , still doing research on this.
Thanks.
1. As long as no code is presented here you cannot expect any help from the forum.
2. You have no time in your “hurry” to demonstrate your problem in a clear and accurate manner. Why do you suppose others do have more of their own time to help you?
1121003 2020-09-23T15:21:16-05:00 #Error:
1121003 -------------------------------------------------
1121003 Driver Files Does not exist
1121003 -------------------------------------------------
2609111 2020-10-11T15:21:16-05:00 #Error:
2609111 -------------------------------------------------
2609111 Driver Files Does not exist
2609111 -------------------------------------------------
2609112 2020-10-12T15:21:16-05:00 #Error:
2609112 -------------------------------------------------
2609112 Driver Files Does not exist
Output:
The timestamp value must be copied from above record and placed in 2nd rec for same group id(first 7bytes field)
1121003 2020-09-23T15:21:16-05:00 #Error:
1121003 2020-09-23T15:21:16-05:00 -----------------
1121003 2020-09-23T15:21:16-05:00 Driver Files Does not exist
1121003 2020-09-23T15:21:16-05:00 -----------------
2609111 2020-10-11T15:21:16-05:00 #Error:
2609111 2020-10-11T15:21:16-05:00 ----------------
2609111 2020-10-11T15:21:16-05:00 Driver Files Does not exist
2609111 2020-10-11T15:21:16-05:00 -----------------
2609112 2020-10-12T15:21:16-05:00 #Error:
2609112 2020-10-12T15:21:16-05:00 ----------------
2609112 2020-10-12T15:21:16-05:00 Driver Files Does not exist
2609112 2020-10-12T15:21:16-05:00 ----------------
********************************* TOP OF DATA **********************************
1121003 2020-09-23T15:21:16-05:00 #ERROR:
1121003 2020-09-23T15:21:16-05:00 -------------------
1121003 2020-09-23T15:21:16-05:00 DRIVER FILES DOES NOT EXIST
1121003 2020-09-23T15:21:16-05:00 -------------------
2609111 2020-10-11T15:21:16-05:00 #ERROR:
2609111 2020-10-11T15:21:16-05:00 -------------------
2609111 2020-10-11T15:21:16-05:00 DRIVER FILES DOES NOT EXIST
2609111 2020-10-11T15:21:16-05:00 -------------------
2609112 2020-10-12T15:21:16-05:00 #ERROR:
2609112 2020-10-12T15:21:16-05:00 -------------------
2609112 2020-10-12T15:21:16-05:00 DRIVER FILES DOES NOT EXIST
******************************** BOTTOM OF DATA ********************************
Have another change with this same requirements. Trying to cut the description to 2nd line and copying the key values as like below. But instead of coming as 2nd line, it continued on same line. Used '/', it gave syntax error.
Your continuing questions only prove that you do not want to really understand the ideas given by responders. You just blindly copy-and-paste the provided code with no intention to get into it. Furthermore, there are no intentions to read any manual.
Otherwise you would easily find out the problem with your new “requirement”.
I personally refuse to help to the “experts” like yourself.
Again sorry. As very rarely i use SORT and i am not expert in that place hence i posted. Let me go thru manuals and fix this. Thanks for motivating me.
Again sorry. As very rarely i use SORT and i am not expert in that place hence i posted. Let me go thru manuals and fix this. Thanks for motivating me.
When you post something , make sure you post the right input data else we all are wasting our time. You have not once shared the actual input data but claiming out put data should look like this or that. How on earth anyone can predict that?
As suggested please learn Synsort and you have got enough help to get going forward.
Try something relevant by doing research and reading the manuals , post back with error and then some one could help you. This way you could learn.
Thank you all. Finally i made it by using another step using similar IFTHEN ,WHEN conditions. this time learned some thing new and coming out some fear of SORT JCL code.
Will surely do more experiments, and make myself comfortable using SORT JCL.
Thank you all. Finally i made it by using another step using similar IFTHEN ,WHEN conditions. this time learned some thing new and coming out some fear of SORT JCL code.
Will surely do more experiments, and make myself comfortable using SORT JCL.
Thanks.
First of all, you need finally to understand, that SORT code has absolutely nothing to do with JCL code...