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
 
Syncsort - SPLICE only certain info.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Jul 24, 2013 4:48 pm    Post subject: Syncsort - SPLICE only certain info.
Reply with quote

Hi,

I have two records like shown below and want to put info appearing at 65th column (three characters) from 02 rec on to 03 rec. (LRECL = 80, RECFM = FB)

Input:
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
02XXX    ABCXXX99VOT   2013102 000999999990000100009999999900001OVRTP 9AB39
03XXX    ABCXXXRAMARAO C MELLI              11 SEVEN ROADS                 


Expected Output:
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
02XXX    ABCXXX99VOT   2013102 000999999990000100009999999900001OVRTP 9AB39
03XXX    ABCXXXRAMARAO C MELLI              11 SEVEN ROADS      OVR           


I've tried below SPLICE but don't get expected output icon_sad.gif

Code:

//TOOLIN   DD *                                                   
 SPLICE FROM(IN) TO(OUT) ON(10,6,CH) WITH(65,3) WITHALL KEEPBASE 


Please help.
Back to top
View user's profile Send private message

Arun Raj

Moderator


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

PostPosted: Wed Jul 24, 2013 5:16 pm    Post subject:
Reply with quote

Ramsri,

Do you have just 2 records in the entire input? If so you could use WHEN=GROUP RECORDS=2 and PUSH the 3 bytes at pos-65
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Jul 24, 2013 5:19 pm    Post subject: Reply to: Syncsort - SPLICE only certain info.
Reply with quote

Arun, thanks......its a big file.......looking for SPLICE way of it.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Jul 24, 2013 5:47 pm    Post subject: Re: Reply to: Syncsort - SPLICE only certain info.
Reply with quote

ramsri wrote:
Arun, thanks......its a big file.......looking for SPLICE way of it.
I believe the 'SPLICE way' is not a part of your requirement.

The initial post just showed 2 records and you wanted to push/propagate one field from record-1 to record-2. If your input file has more than 2 records, then show a sample with more records and do a better way of explaining what exactly you are trying to achieve.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Jul 24, 2013 6:20 pm    Post subject: Reply to: Syncsort - SPLICE only certain info.
Reply with quote

entire file will have 02 and 03 as shown earlier. I kept 03 first followed by 02

Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
03XXX    ABCXXXRAMARAO C MELLI              11 SEVEN ROADS                 
02XXX    ABCXXX99VOT   2013102 000999999990000100009999999900001OVRTP 9AB39


and used below TOOLIN

Code:

//TOOLIN   DD *                                 
  SPLICE FROM(IN) TO(OUT) ON(10,6,CH) WITH(65,3)


Output:
Code:

03XXX    ABCXXXRAMARAO C MELLI              11 SEVEN ROADS      OVR


Thanks.

Its working but partially as I could not retain 02 record.

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

Moderator


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

PostPosted: Wed Jul 24, 2013 7:00 pm    Post subject:
Reply with quote

ramsri wrote:
Its working but partially
Someone trying to help you may well be looking for your "expected output", NOT partially working code/output. Your first post showed 02XXX-record followed by 03XXX, where as it just got reversed in your latest post.

Arun Raj wrote:
If your input file has more than 2 records, then show a sample with more records and do a better way of explaining what exactly you are trying to achieve.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Jul 24, 2013 9:37 pm    Post subject: Reply to: Syncsort - SPLICE only certain info.
Reply with quote

Arun, your WHEN=GROUP idea has given me results........thanks a lot.

Code:

//SYSIN    DD *                                   
 OPTION COPY                                       
 INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(65:65,3))
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Wed Jul 24, 2013 9:52 pm    Post subject: Reply to: Syncsort - SPLICE only certain info.
Reply with quote

Ramsri,

Are you sure about that? It it going to do the PUSH, unconditionally, for every record on your file.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Jul 25, 2013 1:32 pm    Post subject: Reply to: Syncsort - SPLICE only certain info.
Reply with quote

Bill, yes.......ran the job and got expected results too......thanks.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Jul 25, 2013 2:55 pm    Post subject:
Reply with quote

Ramsri,

You're welcome.

One of those cases where we could help the TS in arriving at a solution, without having any clue on what the actual requirement was icon_smile.gif . My best guess is that the input file has the above 2-record set repeated through out the file.
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: Thu Jul 25, 2013 9:26 pm    Post subject:
Reply with quote

Hello,

Suggest you make sure you have used proper data for the test.

There may be some condition(s) that will fail, but haven't been included in the test imput.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1002
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Jul 26, 2013 1:44 pm    Post subject:
Reply with quote

.. so.. Wednesday was psychic day this week...

Garry
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Splice more than 50 occurances rajatbagga DFSORT/ICETOOL 1 Wed Oct 11, 2017 9:36 am
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Need info on EIBCPOSN value in IBM FA... subratarec CICS 11 Wed Jul 12, 2017 3:45 pm
No new posts Need info with DBRC recovery ashek15 IMS DB/DC 0 Mon Jan 23, 2017 6:43 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am

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