View previous topic :: View next topic
|
Author |
Message |
wik123
New User
Joined: 13 Jul 2018 Posts: 8 Location: Nederlands
|
|
|
|
Hi all,
I have 2 PS data sets (both contain the date info as DDMMYYCC format ex: 19091820) and some text
Quote: |
date your order placed and delivery would be on date |
.
I need to combine all the above data into single PS data set and needed below reformatted output file:
Code: |
19-09-2018 date your order placed and delivery would be on date DD-MM-CCYY |
Could any one can help me to achieve this through SORT JCL.?
Thanks,
Wik |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
What have you tried yourself and with what result?
You don't say what's in which dataset or where the first date (19-09-2018) and last date (DD-MM-CCYY) come from. What positions do the various fields occupy in which dataset? For inputs and output - what RECFM? What LRECL ?
Garry |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
"SORT JCL" will not help you! What you need are sort control statements. Sort JCL is simply the JCL that tells the operating system that you want to run a sort program and the data sets (not files) required. |
|
Back to top |
|
|
wik123
New User
Joined: 13 Jul 2018 Posts: 8 Location: Nederlands
|
|
|
|
Hi Garry Carroll,
I tried with MERGE and REFORMAT in sort fields, but it did not works.
Both the PS files are with Record length = 80, Record format =FB and date value starts from 2 to 9th column. 1st PS file contain date 19-09-2018 and next file contains last date DD-MM-CCYY (in DDMMYYCC not DD-MM-CCYY format).
Thanks,
Wik |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2022 Location: USA
|
|
|
|
Nic Clouston wrote: |
"SORT JCL" will not help you! What you need are sort control statements. Sort JCL is simply the JCL that tells the operating system that you want to run a sort program and the data sets (not files) required. |
For newcomers, JCL is everything what is not a computer game. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Show us your control statements,
the output that you created,
and the output that you want. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
Please do spend time in research before expecting a ready solution.
SPLICE Solution
JOINKEYS Solution
Quote: |
I tried with MERGE and REFORMAT in sort fields, but it did not works. |
And you expect us to imagine what went wrong? You got to give us the code as to what you tried and then someone could then happily help you to correct. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
expat wrote: |
Show us your control statements,
the output that you created,
and the output that you want. |
wik123,
Besides this, can you also post the data from both the inputs, If one of the inputs is only having constant text, you could hard-code it in your control statements instead of merging.
Quote: |
date value starts from 2 to 9th column. 1st PS file contain date 19-09-2018 |
Do you have hyphens in the input date as mentioned here? If yes, then the positions 2-9 do not match with that. |
|
Back to top |
|
|
|