To merge 2 records (FB,VB) into 1 record (VB)



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

To merge 2 records (FB,VB) into 1 record (VB)

Postby hariharan_bk » Thu May 15, 2014 7:29 pm

The requirement is -
I need to copy the 9 byte string from File1 (FB) into File 2 (VB) at the position 71.

File data and file DCb details provided below.

The 9 chars (VALUE Xs) in File 2 are the ones to be replaced by the 9 digit char from file 1.

Though i have tried many possible ways to get this done (SORT/ICETOOL), i end up in some kind of VB/FB copy related issues, thereby i will not be able to proceed further.

Could someone please help me on this.

File 1:
--------------------
**********
000000004
**********
Record format . . . : FB
Record length . . . : 9
Block size . . . . : 9

File 2:
----------------------
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
999999999999999999999999999999990000000000000000000000000000000000011GXXXXXXXXX
**************************** Bottom of Data ****************************

Record format . . . : VB
Record length . . . : 3764
Block size . . . . : 27998


Syntaxes tried:
-------------------

//IN1 DD DISP=SHR,DSN=*.EDITCNT.SORTOUT
//IN2 DD DISP=SHR,DSN=*.GETACCNT.OUT
//OUT DD DSN=&&TRLL,
// DISP=(MOD,PASS),
// SPACE=(CYL,(20,20),RLSE),
// UNIT=DISK,VOL=(,,,10)
//OUT1 DD DSN=ACCTTEST.V523241.TRLZ,
// DISP=(OLD,CATLG,CATLG),
// UNIT=SYSDA,
// SPACE=(CYL,(50,10),RLSE),
// DCB=(RECFM=VB,LRECL=3764,BLKSIZE=0)
//TOOLIN DD *
COPY FROM(IN1) TO(OUT) USING(CTL1)
COPY FROM(IN2) TO(OUT) USING(CTL2)
SPLICE FROM(OUT) TO(OUT1) ON(3765,8,PD) WITH(71,3690) USING(CTL3)
/*
//CTL1CNTL DD *
INREC BUILD=(1,4,5:5,3760,3765:SEQNUM,8,PD)
OUTFIL FNAMES=OUT
/*

ERROR:
WER108I IN1 : RECFM=VB ; LRECL= 3764; BLKSIZE= 27998
WER073I IN1 : DSNAME=ACCTTEST.V523241.TRLA
WER257I INREC RECORD LENGTH = 3772
WER238I POTENTIALLY INEFFICIENT USE OF INREC
WER110I OUT : RECFM=VB ; LRECL= 3772; BLKSIZE= 27998
WER074I OUT : DSNAME=SYS14135.T091821.RA000.UIMEXTRT.TRLL.H01
WER552I THIS COPY STEP COULD RUN WITH SIGNIFICANTLY LESS CPU AND ELAPSED TIME
WER410B 5,868K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 2,247,180 BYTES USED
WER244A INREC - SHORT RECORD

-------------------------------------------------------------------------------------------------------------------------------------------

//TOOLIN DD *
COPY FROM(IN1) TO(OUT) USING(CTL1)
COPY FROM(IN2) TO(OUT) USING(CTL2)
SPLICE FROM(OUT) TO(OUT1) ON(3765,8,PD) WITH(71,3690) USING(CTL3)
/*
//CTL1CNTL DD *
INREC OVERLAY=(5,3760,3772:X)
OUTREC BUILD=(1,4,5:5,3760,3765:SEQNUM,8,PD)
OPTION VLSHRT
/*

Issue:
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I IN1 : RECFM=VB ; LRECL= 3764; BLKSIZE= 27998
WER073I IN1 : DSNAME=ACCTTEST.V523241.TRLA
WER237I OUTREC RECORD LENGTH = 3772
WER110I OUT : RECFM=VB ; LRECL= 3772; BLKSIZE= 27998
WER074I OUT : DSNAME=SYS14135.T085918.RA000.UIMEXTRT.TRLL.H01
WER552I THIS COPY STEP COULD RUN WITH SIGNIFICANTLY LESS CPU AND ELAPSED TIME
WER410B 5,868K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 2,243,312 BYTES USED
WER244A OUTREC - SHORT RECORD
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000

------------------------------------------------------------------------------------------------------------------------------
Many Thanks,
Harry
hariharan_bk
 
Posts: 73
Joined: Thu Mar 29, 2012 11:13 am
Has thanked: 5 times
Been thanked: 0 time

Re: DFSORT/ICETOOL to merge 2 records (FB,VB) into 1 record

Postby enrico-sorichetti » Thu May 15, 2014 7:53 pm

the WER prefix tells that You are using SYNCSORT not DFSORT/ICETOOL
You should have noticed that there is a forum section for it,

most IBM competitors to ease the migration to their product
define the IBM modules names as ALIASES to their own so to avoid mass Jcl changes

also when You post code/jcl snippets it is a good habit to use the code tags
the make jcl much easier to read and - MOST IMPORTANT - they preserve the spaces

just an example
//IN1 DD DISP=SHR,DSN=*.EDITCNT.SORTOUT
//IN2 DD DISP=SHR,DSN=*.GETACCNT.OUT
//OUT DD DSN=&&TRLL,
// DISP=(MOD,PASS),
// SPACE=(CYL,(20,20),RLSE),
// UNIT=DISK,VOL=(,,,10)
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: DFSORT/ICETOOL to merge 2 records (FB,VB) into 1 record

Postby hariharan_bk » Thu May 15, 2014 8:26 pm

I have used ICETOOL only.

Please find the code snippet from the JCL:

Please let me know if any more info is required. Could you pls help me get the issue resolved.

/EXTEEE EXEC  PGM=ICETOOL   
/TOOLMSG DD SYSOUT=*       
/DFSMSG  DD SYSOUT=*       
//IN1    DD DISP=SHR,DSN=*.EDITCNT.SORTOUT                         
//IN2    DD DISP=SHR,DSN=*.GETACCNT.OUT                             
//OUT    DD DSN=&&TRLL,                                             
//             DISP=(MOD,PASS),                                     
//             SPACE=(CYL,(20,20),RLSE),                           
//             UNIT=DISK,VOL=(,,,10)                               
//OUT1   DD DSN=ACCTTEST.V523241.TRLZ,                             
//             DISP=(OLD,CATLG,CATLG),                             
//             UNIT=SYSDA,                                         
//             SPACE=(CYL,(50,10),RLSE),                           
//             DCB=(RECFM=VB,LRECL=3764,BLKSIZE=0)                 
//TOOLIN DD *                                                       
  COPY FROM(IN1) TO(OUT) USING(CTL1)                               
  COPY FROM(IN2) TO(OUT) USING(CTL2)                               
  SPLICE FROM(OUT) TO(OUT1) ON(3765,8,PD) WITH(71,3690) USING(CTL3)
/*                                                                 
//CTL1CNTL DD *                                                     
  INREC BUILD=(1,4,5:5,3760,3765:SEQNUM,8,PD)                       
  OUTFIL FNAMES=OUT                                                 
/*
Many Thanks,
Harry
hariharan_bk
 
Posts: 73
Joined: Thu Mar 29, 2012 11:13 am
Has thanked: 5 times
Been thanked: 0 time

Re: DFSORT/ICETOOL to merge 2 records (FB,VB) into 1 record

Postby BillyBoyo » Thu May 15, 2014 9:18 pm

How many records do you have on each file?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: To merge 2 records (FB,VB) into 1 record (VB)

Postby dick scherrer » Thu May 15, 2014 11:29 pm

Hello,

I have used ICETOOL only.
Which gives no information about which product is used.

If you look at the sysout messages, you will see that you are using the code from Syncsort.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: To merge 2 records (FB,VB) into 1 record (VB)

Postby dick scherrer » Thu May 15, 2014 11:31 pm

Add on:

What do you want help with?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: To merge 2 records (FB,VB) into 1 record (VB)

Postby hariharan_bk » Thu May 15, 2014 11:45 pm

File 1 has one record of length 9 bytes. Format is FB.
File 2 has one variable block record of Max length 3764.

I want to replace the chars in file 2 at position 71 by the 9 byte string from file 1.... This is the req.
Pls help
Many Thanks,
Harry
hariharan_bk
 
Posts: 73
Joined: Thu Mar 29, 2012 11:13 am
Has thanked: 5 times
Been thanked: 0 time

Re: To merge 2 records (FB,VB) into 1 record (VB)

Postby dick scherrer » Fri May 16, 2014 12:22 am

Hello,

You have described no requirement . . . All I see is something about using the data from pos 1 to be stored in pos 71 of the other file.

You have not described the "rules". What about duplicates in one file or the other?

Keep in mind that you know just what you want. We have no idea as we do not know your system, let alone this particular requirement.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: To merge 2 records (FB,VB) into 1 record (VB)

Postby hariharan_bk » Fri May 16, 2014 12:46 am

At any point there will be only one record in each of the 2 files. So no dups. Both records in the two files are kind of trailer records having count values. Here I m just trying to merge these two records into single trailer record.
Many Thanks,
Harry
hariharan_bk
 
Posts: 73
Joined: Thu Mar 29, 2012 11:13 am
Has thanked: 5 times
Been thanked: 0 time

Re: To merge 2 records (FB,VB) into 1 record (VB)

Postby enrico-sorichetti » Fri May 16, 2014 12:51 am

from the scarce info of the TS file 1 contains just ONE record with the strand to overlay

I would go for a two pass solution ( simpler to understand )
step1 to build the SORT copy/OVERLAY
step 2 to run the above

here a sample ( modify according to Your needs )

 ****** ***************************** Top of Data ******************************
 - - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  3 Line(s) not Displayed
 000004 //S1      EXEC PGM=SORT
 000005 //SYSPRINT  DD SYSOUT=*
 000006 //SYSOUT    DD SYSOUT=*
 000007 //SORTIN    DD *
 000008 123456789
 000009 //SORTOUT   DD DISP=(,PASS),DSN=&&SYSIN,
 000010 //             UNIT=SYSDA,SPACE=(CYL,(1,1)),
 000011 //             DCB=(RECFM=FB,LRECL=80)
 000012 //SYSIN     DD *
 000013   OPTION COPY
 000014   OUTFIL BUILD=(C'  SORT FIELDS=COPY',80:X,/,
 000015                 C'  INREC  OVERLAY=(11:C''',1,9,C''')',80:X)
 000016 //S2      EXEC PGM=SORT
 000017 //SYSPRINT  DD SYSOUT=*
 000018 //SYSOUT    DD SYSOUT=*
 000019 //SORTIN    DD *
 000020 AAAAAAAAAAAAAAAAAAAAAAAAAAA
 000021 BBBBBBBBBBBBBBBBBBBBBBBBBBB
 000022 //SORTOUT   DD SYSOUT=*
 000023 //SYSIN     DD DISP=(OLD,PASS),DSN=&&SYSIN
 ****** **************************** Bottom of Data ****************************


the result
********************************* TOP OF DATA **********************************
AAAAAAAAAA123456789AAAAAAAA
BBBBBBBBBB123456789BBBBBBBB
******************************** BOTTOM OF DATA ********************************
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post