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
 

 

Slice with fixed and variable length.

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

New User


Joined: 17 Mar 2006
Posts: 3

PostPosted: Mon May 22, 2006 6:54 pm    Post subject: Slice with fixed and variable length.
Reply with quote

With the slice facility I know we can do some kind of matching, but for all examples I saw, is necessary to add some extra characters at the end of the record in order to identify if the record come from the file-A or file-B or if the record are in both files. I am trying to ?match? one file (a large one) with another that only contains the keys a want to select from the first one. The first file is variable length (the record can be as long as 4096). The second one is very short and contains only a portion of the key, which means I am trying to select with a ?generic key? from the first file.

Do yow know if I can do this with the Slice facility?
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon May 22, 2006 9:02 pm    Post subject:
Reply with quote

It's SPLICE, not Slice.

I can't tell from your description what exactly you want.

What is the RECFM and LRECL of each input file? What RECFM and LRECL do you want for the output file?

Please show an example of the records in each input file and the output records you expect. If input file A can have duplicates, show that in your example. If input file B can have duplicates, show that in your example.

What is the position, length and format of each key?
Back to top
View user's profile Send private message
juanova

New User


Joined: 17 Mar 2006
Posts: 3

PostPosted: Mon May 22, 2006 9:49 pm    Post subject:
Reply with quote

Sorry by my "French" icon_redface.gif

FILE-A(vsam)
RECFM: VB
LRECL: AVERAGE RECORD SIZE:2527 MAXIMUM RECORD SIZE:4096

I want all the record on the output file with the same LRECL from the FILE-A.

The example of the input records:

Please see the attach

The file B can not have duplicates.

The keys
File-A are in position 5 to 13, I am going to use the first 2 bytes (binary) and the positions 3 to 10 (packed).

File:B are from position 1 to 28, I am going to use the first 2 bytes (binary) and the positions 14 to 28 (decimal).

Thank you!
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon May 22, 2006 11:09 pm    Post subject:
Reply with quote

Based on what you told me, I think the following DFSORT/ICETOOL job will do what you asked for:

Code:

//S1    EXEC PGM=ICETOOL
//TOOLMSG   DD SYSOUT=*
//DFSMSG    DD SYSOUT=*
//IN1  DD DSN=...  input file A (VB/4096)
//IN2  DD DSN=...  input file B (FB)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS),
// LRECL=4098
//OUT DD DSN=...   outpuf file (VB/4096)
//TOOLIN DD *
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN1) TO(T1) VSAMTYPE(V) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(7,2,BI) ON(9,8,PD) -
  WITHALL WITH(6,4091) VLENOVLY USING(CTL3)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=T1,FTOV,
    BUILD=(C'BB',1,2,14,15,ZD,TO=PD,LENGTH=8)
/*
//CTL2CNTL DD *
  OUTREC BUILD=(1,4,C'VV',7:5)
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(5,2,CH,EQ,C'BV'),
    BUILD=(1,4,7)
/*
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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 6 Sun Nov 06, 2016 8:11 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm


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