IBM Z and LinuxONE IBM Z

 View Only

 Z/OS DFSORT V3R1 - JOIN of Two VSAM Variable Length Files

Girish Sajja's profile image
Girish Sajja posted Thu July 24, 2025 04:14 PM

Hi,

I am trying to create the data from two variable length VSAM files, but I have not been successful.  The task is to be able to identify the records missing from the two files are load them into the respective files.

ICE000I 1 - CONTROL STATEMENTS FOR 5655-ZOS, Z/OS DFSORT V3R1
            JOIN UNPAIRED,ONLY
            JOINKEYS F1=I2AA,FIELDS=(5,21,A),TYPE=V,
              INCLUDE=(05,08,CH,EQ,C'FT000000')
            JOINKEYS F2=T2AH,FIELDS=(5,21,A),TYPE=V,
              INCLUDE=(05,08,CH,EQ,C'FT000000')
            REFORMAT FIELDS=(F1:1,4,?,F1:5,F2:1,4,F2:5)
                                               $
ICE007A 4 SYNTAX ERROR

            OPTION COPY

Thank you.

Sujwal Moon's profile image
Sujwal Moon

Hi Girish,
We are looking into it, we will get back to you as soon as possible.

Thank you.

Sujwal Moon's profile image
Sujwal Moon

Hi Girish,
we are looking into it and we will get back to you as soon as possible.

Thank you. 

Manjunath Shambhashiva's profile image
Manjunath Shambhashiva

Hi Girish, We are looking into it. We will get back to you as soon as possible.

Manjunath Shambhashiva's profile image
Manjunath Shambhashiva

Hi Girish,

Could you please use the REFORMAT FIELDS as below and see if it works for you:
REFORMAT FIELDS=(F1:1,4,?,F2:1,4,F1:5,F2:5)

Girish Sajja's profile image
Girish Sajja

Hi,

The following control cards were successful:

  JOIN UNPAIRED,ONLY
  JOINKEYS F1=I2AA,FIELDS=(5,21,A),TYPE=V,
    INCLUDE=(05,08,CH,EQ,C'FT000000')
  JOINKEYS F2=T2AH,FIELDS=(5,21,A),TYPE=V,
    INCLUDE=(05,08,CH,EQ,C'FT000000')
  REFORMAT FIELDS=(F1:1,4,?,F2:1,4,F1:5,F2:5)
  OPTION COPY
  OUTFIL FNAMES=I2AAOUT,INCLUDE=(5,1,CH,EQ,C'1'),BUILD=(1,4,10)
  OUTFIL FNAMES=T2AHOUT,INCLUDE=(5,1,CH,EQ,C'2'),BUILD=(1,4,10)

Thank you very much.