IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help on the multiple files reformat in JCL SORT.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
wik123

New User


Joined: 13 Jul 2018
Posts: 8
Location: Nederlands

PostPosted: Wed Sep 19, 2018 10:47 am
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Sep 19, 2018 2:58 pm
Reply with quote

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 ?

icon_rolleyes.gif

Garry
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Sep 19, 2018 4:16 pm
Reply with quote

"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
View user's profile Send private message
wik123

New User


Joined: 13 Jul 2018
Posts: 8
Location: Nederlands

PostPosted: Wed Sep 19, 2018 4:41 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2022
Location: USA

PostPosted: Wed Sep 19, 2018 4:43 pm
Reply with quote

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. 36_8_9.gif 12.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Sep 19, 2018 4:45 pm
Reply with quote

Show us your control statements,
the output that you created,
and the output that you want.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Sep 19, 2018 7:15 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Sep 19, 2018 7:41 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 5
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top