Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need help on the multiple files reformat in JCL SORT.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
wik123

New User


Joined: 13 Jul 2018
Posts: 6
Location: india

PostPosted: Wed Sep 19, 2018 10:47 am    Post subject: Need help on the multiple files reformat in JCL SORT.
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: 1025
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Sep 19, 2018 2:58 pm    Post subject:
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: 2100
Location: UK

PostPosted: Wed Sep 19, 2018 4:16 pm    Post subject: Reply to: Need help on the multiple files reformat in JCL SORT.
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: 6
Location: india

PostPosted: Wed Sep 19, 2018 4:41 pm    Post subject:
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

Active User


Joined: 29 Apr 2008
Posts: 365
Location: Maryland

PostPosted: Wed Sep 19, 2018 4:43 pm    Post subject: Re: Reply to: Need help on the multiple files reformat in JCL SORT.
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: 8723
Location: Welsh Wales

PostPosted: Wed Sep 19, 2018 4:45 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 2031
Location: NY,USA

PostPosted: Wed Sep 19, 2018 7:15 pm    Post subject:
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: 2408
Location: @my desk

PostPosted: Wed Sep 19, 2018 7:41 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Anyone know how to copy Unix files? John Poulakos JCL & VSAM 7 Wed Oct 10, 2018 12:57 am
No new posts PL/I read error for HFS files Joe Kirsch PL/I & Assembler 6 Fri Sep 28, 2018 9:13 pm
No new posts Delete Multiple rows in chunks by usi... dharmaraok DB2 5 Tue Sep 11, 2018 8:44 pm
No new posts Merge two files and sum up the count ... preeti6 JCL & VSAM 6 Thu Sep 06, 2018 10:57 am
No new posts Remove selected duplicate rows from t... hnharish DFSORT/ICETOOL 3 Wed Sep 05, 2018 3:11 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us