|
View previous topic :: View next topic
|
| Author |
Message |
Rimjhim
New User
Joined: 18 May 2022 Posts: 12 Location: India
|
|
|
|
Greetings All,
My requirement is to copy records from one VSAM. The records which need to be copied should have ~~~~~ from 10th col to 15th.
Below is the JCL
//STEP020 EXEC PGM=ICEMAN
//SORTIN DD DSN=RS28753.B.A.D220526,DISP=SHR
//OUT1 DD DSN=RS28753.B.A.D220526.A,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(15,5,CH,EQ,C'~~~~~')
OUTFIL FNAMES=OUT1,BUILD=(1,4,4304:X),VLFILL=C' '
Both input and output files have
Record format . . . : VB
Record length . . . : 4304
The error I am getting is:
ICE907I 1 ST=BELOW,SA=49736,NF=1,LF=49736,SF=49736
ICE855I 0 OUT1 : TX=N, R=D, L=D, B=D, BL=0, BR=0, DCT=37, VS=N, RU=X, SB=8
ICE218A 6 12 BYTE VARIABLE RECORD IS SHORTER THAN 19 BYTE MINIMUM FOR F
ICE751I 1 EF-BASE CB-BASE F0-BASE E8-I49502
ICE052I 0 END OF DFSORT
Please help me here
Thanks and Regards
Rimjhim |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
1. This is neither JCL, nor VSAM issue. This tool is called ICETOOL/DFSORT utility.
2. Please, learn how to use the Code button, when posting your samples at the forum.
| Rimjhim wrote: |
Greetings All,
My requirement is to copy records from one VSAM. The records which need to be copied should have ~~~~~ from 10th col to 15th.
Below is the JCL
| Code: |
//STEP020 EXEC PGM=ICEMAN
//SORTIN DD DSN=RS28753.B.A.D220526,DISP=SHR
//OUT1 DD DSN=RS28753.B.A.D220526.A,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(15,5,CH,EQ,C'~~~~~')
OUTFIL FNAMES=OUT1,BUILD=(1,4,4304:X),VLFILL=C' '
|
Both input and output files have
Record format . . . : VB
Record length . . . : 4304
The error I am getting is:
| Code: |
ICE907I 1 ST=BELOW,SA=49736,NF=1,LF=49736,SF=49736
ICE855I 0 OUT1 : TX=N, R=D, L=D, B=D, BL=0, BR=0, DCT=37, VS=N, RU=X, SB=8
ICE218A 6 12 BYTE VARIABLE RECORD IS SHORTER THAN 19 BYTE MINIMUM FOR F
ICE751I 1 EF-BASE CB-BASE F0-BASE E8-I49502
ICE052I 0 END OF DFSORT |
Please help me here
Thanks and Regards
Rimjhim |
3. Looks like your input has RECFM=VB or RECFM=FB format, and there is (at least one) record of length 12 bytes:
| Code: |
| ICE218A 6 12 BYTE VARIABLE RECORD IS SHORTER THAN 19 BYTE MINIMUM FOR F???????????????? |
But one of your SORT utility statements requires the minimum record length of 19 bytes (15+5-1):
| Code: |
| INCLUDE COND=(15,5,CH,EQ,C'~~~~~') |
Please, RTFM: how to deal with too short VB records? There are several VL-like parameters to handle this issue properly.
P.S.
Important! Do not try to find any explanation neither in JCL, nor in VSAM manuals! |
|
| Back to top |
|
 |
Rimjhim
New User
Joined: 18 May 2022 Posts: 12 Location: India
|
|
|
|
| @sergeyken, I have made the corrections. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
| Rimjhim wrote: |
| @sergeyken, I have made the corrections. |
You major problem is, dealing with incorrect record length.
Have you fixed it?
Or at least: did you find what is actually wrong in your input data, and/or SORT utility statements and parameters? |
|
| Back to top |
|
 |
Rimjhim
New User
Joined: 18 May 2022 Posts: 12 Location: India
|
|
|
|
No, the issue is still not fixed. By correction I meant I have posted the question in the ICETOOLS topic and added the CODE utility.
The issue still persists |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
| Rimjhim wrote: |
No, the issue is still not fixed. By correction I meant I have posted the question in the ICETOOLS topic and added the CODE utility.
The issue still persists |
You need to find out:
1) what are the DCB attributes of your input dataset? (RECFM, LRECL, BLKSIZE)
2) what are the actual physical records in you test input dataset? (you can use the straightforward output from SORT utility, without any selection or conversion)
3) depending on the results of 1-2, you need to find the way to resolve your issue.
With not enough information, no-one would be able to help you... |
|
| Back to top |
|
 |
Rimjhim
New User
Joined: 18 May 2022 Posts: 12 Location: India
|
|
|
|
Input file Info:
| Code: |
Data class . . . . . : NULLDSN
Organization . . . : PS Current Utilization
Record format . . . : VB Used blocks . . . . : 3
Record length . . . : 4304 Used extents . . . : 1
Block size . . . . : 27998
1st extent blocks . : 4
Secondary blocks . : 2 Dates
Data set name type : Creation date . . . : 2022/0
|
Input Data:
Here, there are many records like this and we need to only include the ones which look like 2022-05-26 BHB.
| Code: |
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
|
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
| Code: |
Record format . . . : VB Used blocks . . . . : 3
Record length . . . : 4304 Used extents . . . : 1
|
With RECFM=VB the character positions are calculated by SORT utility including 4-byte RDW prefix. So, the visually first character will have position 5 within the record.
LRECL=4304 defined the maximum allowed record length within this dataset. Real records may have any length, from 5 to 4304 bytes physically, or from 1 to 4300 bytes logically.
You can verify the length of your records in your SORT statements, by using ...,BUILD=(1,2,BI,...) to print out the record length as decimal number. This may help you to detect the short records.
For your initial example, you can use INCLUDE COND=(1,2,BI,LT,+19) to select short records, and to make the decision: how to deal with them?
| Quote: |
| Here, there are many records like this and we need to only include the ones which look like 2022-05-26 BHB. |
| Code: |
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
CONABN-JKP 02345459323 2022-05-26 BHB
|
How do you plan to verify your key field located at different offsets for different records? |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
|
|
| OP needs the option VLSCMP. Moved the topic to DFSORT Section. |
|
| Back to top |
|
 |
Rimjhim
New User
Joined: 18 May 2022 Posts: 12 Location: India
|
|
|
|
Hello,
My requirement changed but the issue remains.
Now the requirement is, in the input file we get details like email id. We need to strip off records which do not have the email id.
I am using the below sort card
| Code: |
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,291,SS,EQ,C'.COM')
INREC IFTHEN=(WHEN=(1,2,BI,LT,291),OVERLAY=(291:X))
/*
|
The output is sent to SYSOUT and the inpur file details are as below
| Code: |
Data class . . . . . : NULLDSN
Organization . . . : PS Current Utilization
Record format . . . : VB Used blocks . . . . : 3
Record length . . . : 291 Used extents . . . : 1
Block size . . . . : 27998
1st extent blocks . : 4
Secondary blocks . : 2 Dates
Data set name type : Creation date . . . : 2022/05/30
|
Error I am getting
ICE218A 6 100 BYTE VARIABLE RECORD IS SHORTER THAN 291 BYTE MINIMUM FOR
Please help me understand the issue. Operations on VB files confuses me. |
|
| Back to top |
|
 |
Rimjhim
New User
Joined: 18 May 2022 Posts: 12 Location: India
|
|
|
|
Further, I looked up the IBM docs(https://www.ibm.com/docs/en/zos/2.3.0?topic=messages-ice218a) for this error and it says that in case of INCLUDE I should use VLSHRT so I modified my SORT card to look like
| Code: |
//SYSIN DD *
OPTION COPY,VLSHRT
INCLUDE COND=(1,291,SS,EQ,C'.COM')
INREC IFTHEN=(WHEN=(1,2,BI,LT,291),OVERLAY=(291:X))
/*
|
Still, same abend. Kindly advise |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
If you explicitly select only records shorter than 291 bytes, then you cannot OVERLAY non-existing byte at position 291 to whatever else.
It is as clear as a sunny day.
For instance, you can try to BUILD a new record; maybe, like this
| Code: |
| …,BUILD=(1,4,291:X),… |
|
|
| Back to top |
|
 |
Rimjhim
New User
Joined: 18 May 2022 Posts: 12 Location: India
|
|
|
|
I first ran the job without the VLSHRT, still same error.
It is then I went through the IBM docs to see what I am missing.
| Code: |
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,291,SS,EQ,C'.COM')
INREC IFTHEN=(WHEN=(1,2,BI,LT,291),OVERLAY=(291:X))
/*
|
Error:
| Code: |
ICE906I 1 ST=BELOW,SR=110142,RC=0
ICE907I 1 ST=BELOW,SA=56872,NF=1,LF=56872,SF=56872
ICE218A 6 100 BYTE VARIABLE RECORD IS SHORTER THAN 291 BYTE MINIMUM FOR
ICE751I 1 EF-BASE F0-BASE E8-I49502
ICE052I 0 END OF DFSORT
|
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
| Rimjhim wrote: |
I first ran the job without the VLSHRT, still same error.
It is then I went through the IBM docs to see what I am missing.
| Code: |
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,291,SS,EQ,C'.COM')
INREC IFTHEN=(WHEN=(1,2,BI,LT,291),OVERLAY=(291:X))
/*
|
Error:
| Code: |
ICE906I 1 ST=BELOW,SR=110142,RC=0
ICE907I 1 ST=BELOW,SA=56872,NF=1,LF=56872,SF=56872
ICE218A 6 100 BYTE VARIABLE RECORD IS SHORTER THAN 291 BYTE MINIMUM FOR
ICE751I 1 EF-BASE F0-BASE E8-I49502
ICE052I 0 END OF DFSORT
|
|
Please, read the previous responses more carefully.
More than one people have provided you with good hints, but you continue ignoring any answer. |
|
| Back to top |
|
 |
Rimjhim
New User
Joined: 18 May 2022 Posts: 12 Location: India
|
|
|
|
Apologies. It worked.  |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|