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: 1054
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: 2161
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: 421
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: 8777
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: 2128
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: 2481
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 Search string from concatenated input... srini24 JCL & VSAM 8 Sat Mar 30, 2019 9:51 pm
No new posts Split input file into multiple files ... srini24 DFSORT/ICETOOL 1 Sat Mar 30, 2019 9:39 pm
No new posts count the number of records from diff... janmejay CA Products 4 Mon Mar 25, 2019 11:29 pm
No new posts files whose record count varies with ... janmejay CA Products 0 Fri Mar 08, 2019 9:35 pm
This topic is locked: you cannot edit posts or make replies. Copy one file to possible multiple files dibyendumandal11111 SYNCSORT 9 Fri Mar 08, 2019 2:47 am

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