Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to splice with Syncsort, FILEAID or other utility

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
arbinddobhal

New User


Joined: 26 Mar 2010
Posts: 6
Location: St Paul

PostPosted: Fri Mar 26, 2010 10:28 pm    Post subject: How to splice with Syncsort, FILEAID or other utility
Reply with quote

Hi! I need to do the following.

Copy the contents of a record and append it to the previous record, Then Delete the current record.

HERE is what I need to do. The Records are in a PS dataset.

Input:
REC1: ABCD EFGH IJK
REC2: LMNO PQRS

Output:
REC1: ABCD EFGH IJKLMNO PQRS

Can someone help me out. Can we do this with FILEAID. If I could run the FILEAID with a JCL, that would be great.
Thanks.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Mar 26, 2010 10:58 pm    Post subject:
Reply with quote

Quote:
Can we do this with FILEAID
Is FILEAID a requirement?
Quote:
If I could run the FILEAID with a JCL
Can it be done in an interactive session?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 26, 2010 11:34 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

Is there some reason the solution must be FileAid?

There are examples of doing just this with sort already posted n the forum. . . Use SEARCH above. . .
Back to top
View user's profile Send private message
arbinddobhal

New User


Joined: 26 Mar 2010
Posts: 6
Location: St Paul

PostPosted: Fri Mar 26, 2010 11:53 pm    Post subject: Reply to: Can we copy content of a rec in a previous rec wit
Reply with quote

No Fileaid is not a requirement. Any utility will do as long as I can use it in a JCL.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sat Mar 27, 2010 12:00 am    Post subject: Re: Reply to: Can we copy content of a rec in a previous rec
Reply with quote

arbinddobhal wrote:
No Fileaid is not a requirement. Any utility will do as long as I can use it in a JCL.
Sort should do this just fine.
What sort do you have?
What level/release/PTF/etc is the sort?
What is the recfm & recsize of the input file?
What is the desired recfm & recsize of the output file?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Sat Mar 27, 2010 12:07 am    Post subject:
Reply with quote

You should look in to famous 'Smart Dfsort Tricks' pdf by Frank.
Then find the topic combine multiple records in to one.

You could also take a look at TF (Text flow) line command which can be used for such requirements.
Back to top
View user's profile Send private message
arbinddobhal

New User


Joined: 26 Mar 2010
Posts: 6
Location: St Paul

PostPosted: Sat Mar 27, 2010 12:36 am    Post subject: Reply to: How to splice with FILEAID or other utility
Reply with quote

What sort do you have? SORT, SYNCSORT
What level/release/PTF/etc is the sort? SYNCSORT on Z/os 1.3.0
What is the recfm & recsize of the input file? : Recfm: FB, Rec Legnth: 407
What is the desired recfm & recsize of the output file? RecFM: FB, Rec Legnth : 407

Thanks!![/b]
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Mon Mar 29, 2010 11:20 pm    Post subject:
Reply with quote

arbinddobhal,

Show a sample input which covers all possible combinations of real input data. Will you have only 2 records in the input file always? If not, are you trying to combine 1st record and the 2nd, 3rd and 4th, 5th and 6th and so on?
arbinddobhal wrote:
What is the recfm & recsize of the input file? : Recfm: FB, Rec Legnth: 407
What is the desired recfm & recsize of the output file? RecFM: FB, Rec Legnth : 407
From whatever you have written in your initial post, your output file should be having double the input LRECL. How can it be the same?
Back to top
View user's profile Send private message
arbinddobhal

New User


Joined: 26 Mar 2010
Posts: 6
Location: St Paul

PostPosted: Tue Mar 30, 2010 12:43 am    Post subject: Reply to: How to splice with Syncsort, FILEAID or other util
Reply with quote

Arun,

Thanks for the reply. Here is the whole problem.

I have a huge file which usually has 90,000 Records in it. Sometimes there are records which should be part of the previous record. I need to find the records which are split into two records and then combine them into one. I can put a fileaid step in a JCL to find the split records but I am not sure what I should do to combine them.

Thanks,
Arbind
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Tue Mar 30, 2010 12:50 am    Post subject:
Reply with quote

Quote:
I need to find the records which are split into two records and then combine them into one
How do you plan to identify these records? Still it does nt look clear. icon_evil.gif

Unless you show some "real"istic data, it's difficult for somebody to make out what you are dealing with.
Back to top
View user's profile Send private message
arbinddobhal

New User


Joined: 26 Mar 2010
Posts: 6
Location: St Paul

PostPosted: Tue Mar 30, 2010 12:52 am    Post subject: Reply to: How to splice with Syncsort, FILEAID or other util
Reply with quote

Arun,

The first record of these records are always a special Char. So I can easily find them. All I need is a away to concatenate the record to previous record and then delete the current record.

Thanks,
Arbind
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Tue Mar 30, 2010 2:15 am    Post subject:
Reply with quote

Quote:
The first record of these records
icon_evil.gif
Back to top
View user's profile Send private message
arbinddobhal

New User


Joined: 26 Mar 2010
Posts: 6
Location: St Paul

PostPosted: Tue Mar 30, 2010 2:39 am    Post subject: Reply to: How to splice with Syncsort, FILEAID or other util
Reply with quote

I meant the first Character of these split records is always a special character.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Tue Mar 30, 2010 1:38 pm    Post subject:
Reply with quote

Quote:
a special character
Which special character? Still you did not answer how the splitted and the combined records have the same length of 407. You can post some sample input records and the expected output out of it using the "Code" tags. You cannot expect somebody to help you out if you are not willing to post any useful info.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us