Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Mar 06, 2006 11:14 am Post subject:
You can use a DFSORT job like the one below to do what you asked for. You'll need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) in order to use DFSORT's IFTHEN and OVERLAY functions. Only DFSORT has these functions, so if you don't have DFSORT, you won't be able to use them. If you do have DFSORT, but you don't have the Dec, 2004 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
I am getting the error message when i tried to use INREC WHEN
may be as frank , my shop doesn't have that DFSORT PTF 2004 .
The error message is as below
SYNCSORT FOR Z/OS 1.1BR TPF3A U.S. PATENTS:
SYSIN :
OPTION COPY
RECORD TYPE=V
INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'CTS'),
*
OVERLAY=(141:C'R8401 '))
still can it be possible in JCl????? ,Doing it in a single step .
The following are the attributes of the input file
Code:
VSAM Cluster Attributes:
CI size . . . . . 4096 size of the data control intervals
Buffer space . . . 12288 buffer space to be allocated at open time
Share options . Cross region . 2 Cross systems 3
Process options Reuse . . . . N Recovery . . . Y
Spanned . . . N Erase . . . . N
Extended . . . N Extended addr N
Compressed . . N Writecheck . . N
Code:
VSAM Data Allocation:
Allocation unit . CYL REC, KB, MB, TRK, or CYL
Space . . . . . Primary . . 125 Secondary . 20
More: - +
Space . . . . . Primary . . 125 Secondary . 20
Record size . . Average . . 100 Maximum . . 2041
Free space . . % of CI . . 12 % of CA . . 4
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Mar 07, 2006 11:41 am Post subject:
Quote:
I am getting the error message when i tried to use INREC WHEN
may be as frank , my shop doesn't have that DFSORT PTF 2004 .
The error message is as below
SYNCSORT FOR Z/OS 1.1BR TPF3A U.S. PATENTS:
Actually, your shop is using Syncsort, not DFSORT. DFSORT supports IFTHEN and OVERLAY. Syncsort doesn't. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
When I tried with the JCL given by Kolusu i am getting a Error
like OUTREC - SHORT RECORD The Message is Below.
Code:
SORT FIELDS=COPY
OUTREC FIELDS=(0001,0075,
0076:1,3,CHANGE=(05,C'CTS',C'GU '),
NOMATCH=(076,05),
0081:1,3,CHANGE=(60,C'CTS',
C' '),
NOMATCH=(081,60),
0141:1,3,CHANGE=(06,C'CTS',C'R8401 '),
NOMATCH=(141,06),
0147,1895)
WER164B 8,960K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 3,521K BYTES USED
WER146B 4K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=V ; LRECL= 2041; CISIZE = 4096
WER237I OUTREC RECORD LENGTH = 2041
WER110I SORTOUT : RECFM=V ; LRECL= 2041; CISIZE = 4096
WER410B 5,884K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 456K BYTES USED
WER244A OUTREC - SHORT RECORD
The Verified for this Error and Frank in one forum says the one are more variable length record not of that much length (0147,1895) , so i tried to different lengths.
Like (0147,300) - same error message its giving
(0147,100) - Vsam logical error if i give the sort card like this.
The Input file's MAX length is = 2041 , AVg reclength = 100
I defined a Output VSAM file with the same attributes of Input file.
I tried with the flat output file also , but i am getting the same error message.
mY USERID.TEMP.VSAM.KSDS AND USERID.TEMP.VSA1.KSDS are having
KEYLEN----------------56 AVGLRECL-------------100
RKP--------------------0 MAXLRECL------------2041
What is your SORTIN LRECL?? In your first post you mentioned
Quote:
The Input file is VSAM File with AVg.rec length as 100 and Max.Reclength as 2315
The problem is with the data. Atleast one record is having wrong data in your VSAM file
Code:
----------- V=SYNCSORT P=SYNCSORT UTIL. Z/OS R=V1R1 I=WER244A D=M ------------
****************** Text Below Copyright (c) 2006, SYNCSORT *******************
WER244A .ddname. {INREC,OUTREC} SHORT RECORD
EXPLANATION: The ddname will be SORTOUT, SORTOFxx,
SORTOFx or the ddname provided by an OUTFIL FNAMES parameter.
A variable-length record was too short to contain all the fields
specified on the control statement. Program HISTOGRM may be used to
determine the length of the shortest record in the input file.
****************************** BOTTOM OF DATA ********************************
Try using HISTOGRM.
Code:
------------ V=SYNCSORT P=SYNCSORT FOR Z/OS R=V1R1 I=HISTOGRM D=M ------------
****************** Text Below Copyright (c) 2006, SYNCSORT *******************
HISTOGRM Utility Program
You may page down or use the FIND command to scroll to the following
subtopics:
What Is HISTOGRM?
Using HISTOGRM to Determine L6 and L7 Values for SyncSort
Control Parameters for HISTOGRM
Job Control Language
Executing HISTOGRM through an E15 Exit
HISTOGRM Messages
What Is HISTOGRM?
HISTOGRM is a separate program which is used to gain information about
variable-length files. The program scans a variable-length file and provides
information which can then be used to run more efficient sorts. HISTOGRM can
report the:
o Block count for minimum and maximum block lengths
o Record count for minimum and maximum record lengths
o Average record length
o Total number of bytes in the file
o Total number of blocks in the file
o L6 value (average work space) for variable-length records
o L7 value (segment length) for variable-length records
HISTOGRM can be used to analyze variable-length records in a VSAM
entry-sequenced or key-sequenced data set. When HISTOGRM processes a VSAM
file only record information is gathered; block statistics are not produced.
Using HISTOGRM to Determine L6 and L7 Values for SyncSort
The L6 and L7 values HISTOGRM calculates are passed to SyncSort via the L6,
L7 PARM options or the l6, l7 values in the LENGTH parameter of the RECORD
control statement. (When there is a conflict, the PARM specification takes
precedence.) These values are ignored in a merge or copy application.
Control Parameters for HISTOGRM
The control parameters are outlined below; defaults are underlined. To
specify other values, include a control statement in the SYSIN DD portion
of the job control stream. Parameters may appear anywhere through column
71, provided they are separated by commas with no intervening blanks.
NRECS
{ ALL }
NRECS={ --- }
{ nnn }
Tells how many records to scan in the variable-length file.
WIDTH
{ 20 }
WIDTH={ -- }
{ nnnn }
Indicates the range between minimum and maximum block lengths and the
minimum and maximum record lengths in each group of the HISTOGRM output. The
number specified for the WIDTH value must be a multiple of 4. (4, 8, 12, . . .
See examples of block and record HISTOGRMs that follow.) Adjust this range
based on the characteristics of the file (the lengths of the shortest and
longest record) and the desired length of HISTOGRM.
Tells the type of disk device that will be used for intermediate storage
when the sort is run. Specify the device number if HISTOGRM is to calculate
L6 and L7.
KEYL
{ 20 }
KEYL={ -- }
{ nnnn }
Gives the end location of the last control field in the record. Specify a
value for KEYL if HISTOGRM is to calculate L6 and L7.
BIGREC
{ 20 }
{ -- }
BIGREC={ nnnn }
{ MAX }
{ MAX }
Specifies the maximum number of HIS025I messages that will be issued in a
HISTOGRM execution. When HISTOGRM processes a large file, this message may
be generated as often as once for each record in the file. BIGREC limits the
number of HIS025I messages that will be issued in each execution. HISTOGRM
processing continues, but no further messages are issued once the BIGREC
value is reached.
BLOCK
{ BLOCK }
{ ----- }
{ NOBLOCK }
Tells whether or not to print the graphic portion of the HISTOGRM for block
length.
REC
{ REC }
{ --- }
{ NOREC }
Tells whether or not to print the graphic portion of the HISTOGRM for record
length.
BIGSTOP
{ BIGSTOP }
{ ------- }
{ NOBIGSTP }
Tells whether or not to terminate the HISTOGRM run if an RDW value greater
than the DCB LRECL is encountered in the input file.
Job Control Language
The following example shows a sample execution of HISTOGRM.
1. SYSUT1 is the variable-length file to be scanned. Specify the DCB
parameter if
Figure 232. Sample JCL/Control Stream for HISTOGRM
SYSUT1 is a non-standard label tape.
2. SYSPRINT is the data set on which printed output will appear. The DCB
(not illustrated) is: DCB=(LRECL=121,BLKSIZE=121,RECFM=F).
3. You may use DD DUMMY instead of SYSIN DD *. Specify //SYSIN DD
DUMMY,DCB=(LRECL=80,RECFM=FB,BLKSIZE=80).
Executing HISTOGRM through an E15 Exit
It is possible to execute HISTOGRM during a sort by specifying an E15 exit
in the MODS control statement and coding HISTE15 as the r value. This
produces a printout of the HISTOGRM for Records at the conclusion of the
job. (It is, however, not possible to get a printout of the HISTOGRM for
Blocks when initiating HISTOGRM in this way.)
The following example shows a sample execution of HISTOGRM by an E15 exit
during a sort.
Figure 233. Sample JCL/Control Stream for HISTOGRM Initiated by an
E15 Exit
1. SORTIN is a DD statement for SyncSort. It contains the data set that will
be analyzed and then sorted. The data set name is VARDATA, and it is
found on the standard labeled tape with the volume serial number 000001.
The data set is already in existence. If SORTIN is not a standard label
tape, DCB parameters must be specified. Note that RECFM must be either
V, VB, or VBS.
E15 Exit
1. SORTIN is a DD statement for SyncSort. It contains the data set that will
be analyzed and then sorted. The data set name is VARDATA, and it is
found on the standard labeled tape with the volume serial number 000001.
The data set is already in existence. If SORTIN is not a standard label
tape, DCB parameters must be specified. Note that RECFM must be either
V, VB, or VBS.
2. SORTOUT is a DD statement for SyncSort. It assigns the data set name
SORTED.DATA to the output file, and specifies a 3490 tape unit with the
volume serial number 000002. It is not yet in existence. The DCB
parameters default to those of SORTIN.
3. SORTWK01, SORTWK02, and SORTWK03 are DD statements for SyncSort. They
reserve 20 cylinders of primary space, 10 cylinders of secondary space
on direct access devices for intermediate storage.
4. SYSOUT is a DD statement for SyncSort. It assigns the SyncSort messages
to the output device associated with class A.
5. The MODLIB DD statement is used to define the partitioned data set in
which the HISTE15 program resides; MODLIB is referenced in the MODS
control statement. The data set name is SYS1.SYNCLIB, and the DISP shows
the library may be shared.
6. The SYSIN DD * statement marks the beginning of the input stream that
includes the sort control statements. The SORT control statement shows
that one control field will be sorted on. It consists of bytes 4-13 of
the record, contains character data, and is to be sorted in ascending
order.
The MODS control statement must specify an E15 exit as an exit-type
parameter and give HISTE15 as the exit routine name. HISTE15 takes 5000
bytes of core storage and resides in the main SyncSort library referenced
here by a DD statement named MODLIB. The routine does not require
link-editing during sort execution.
7. SYSPRINT is the data set on which the printout from HISTE15 appears. Its
DCB is: DCB=(LRECL=121,BLKSIZE=121,RECFM=F).
8. The HISTIN DD statement is optional. It is used to override any default
values. The following DCB parameter must be specified:
DCB=(LRECL=80,RECFM= FB,BLKSIZE=80). (With HISTIN DD *, the DCB is not
necessary.)
Defaults for HISTE15
NRECS= ALL
WIDTH= 20
DEVWK= The same SORTWK devices used in executing this sort.
KEYL= End of key field furthest into record for this sort.
BIGREC= 0 (This cannot be overridden.)
NOBLOCK (This cannot be overridden.)
REC
NOBIGSTP (This cannot be overridden.)
****************************** BOTTOM OF DATA ********************************
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Wed Mar 08, 2006 8:43 am Post subject:
Quote:
but in this same Forum , there you mentioned for a simillar situation to use
PARM='VLTESTI=1' and PARM='VLTESTI=2'
VLITESTI parm is ONLY applicable to INCLUDE and OMIT control statements. So it won't be much of an use . Run this job to find out the min and max length record
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum