Joined: 22 Mar 2009 Posts: 161 Location: South Africa
Thanks Expat for your support it really worked. As in hurry I putted that "*"..But it again abended with the error ICE218A 1 149 BYTE VARIABLE RECORD IS SHORTER THAN 188 BYTE MINIMUM FOR. But I used OPTION VLSHRT and the job ran successfully.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
The second error has nothing to do with the first error. The first error was a JCL error. The second error was a "short" record error. You have to get everything right for a job to execute successfully. But good for you for figuring out how to fix your second error.
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
Hi,
In the above jcl if I dont want the header and trailer records in the output file then which option I will choose. As I tried with
DATASORT FROM(IN) TO(OUT) USING(CTL1) but it shows syntax error.
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
thanks Frank..As given by you the jcl worked fine...Another question
there are lot of null values from the position 174 to 184..If I want to omit the null values then wat condition I need to put..
But getting following error evenif I am using the OPTION VLSHRT.
Code:
********************************* TOP OF DATA ***************
ICE200I 0 IDENTIFIER FROM CALLING PROGRAM IS 0001
ICE805I 0 JOBNAME: XXXXXXXX1 , STEPNAME: SORT0001
ICE802I 0 BLOCKSET TECHNIQUE IN CONTROL
ICE201I G RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE751I 0 C5-K51707 C6-K51707 C7-K54603 C8-K51707 E7-K51707
ICE052I 3 END OF DFSORT
******************************** BOTTOM OF DATA *************
My file is a Vb file which you can check from previous posts.
Also the column which needs to be sorted starts at position 174 but as it is VB file so, I had puted 178.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
abhijit.nayak01,
It's not clear what you mean by "there are lot of null values from the position 174 to 184". Do you mean that your variable-length records are "short" or do you mean something else - what?
You haven't actually shown any DFSORT error messages. But I suspect you got the following ICETOOL error message in //TOOLMSG:
ICE653A 0 SKIPREC, STOPAFT OR COND (SUBSET) OR STOPAFT (DATASORT) NOT ALLOWED
You cannot use OMIT COND=(...) with SUBSET.
Let's start over.
Show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file. Indicate how the header and trailer records can be identified. Indicate which records you are trying to omit.
Ideally the blanks in between are not spaces these are blanks i.e. the user had not entered anything to this field. Because when I see through copybook by using fileaid it shows "INVALID" for these blank records at position 174 but when I view the files by simple browsing it shows blank. I want to remove these records.
To remove header and trailer records I had used the condition i.e.
Code:
OMIT COND(05,02,ZD,EQ,00,05,02,ZD,EQ,99)
because the other records value at position 01 ( which will be 05 in case of VB files) is in between 01-98. But I want to remove the hader and trailer records without using the above OMIT condition.
Following are the details of both the i/p and o/p file:
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
abhijit.nayak01,
I am not sure as to why you insist using subset operator when it is a simple sort operation of eliminating and sorting records. SUBSET operator comes in handy to sort records without disturbing header and trailer records. In your case you want to completely eliminate them. Look below for the DFSORT JCL which will give you the desired results.
Another thing, can you please tell me the differences between the toolmsg and dfsmsg.
TOOLMSG DD - Defines the ICETOOL message data set for all operations.
DFSMSG DD - Defines the DFSORT message data set for all operations.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
Hi Kolusu,
Thanks for your response. The code works but still the issue of null records not getting resolved. As I said earlier the null records are not spaces. When I tried with browsing the values with HEX ON but it has blank at those places instead of X040. And the o/p of the above code comes in the following way:
ICE802I 0 BLOCKSET TECHNIQUE IN CONTROL
ICE201I G RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE162I 0 ICEIEXIT CHANGED ONE OR MORE OPTIONS IN EFFECT
ICE126A 9 INCONSISTENT REFORMATTING FOR SORTOUT : REASON CODE 02, IFTHEN 0
ICE751I 0 C5-K51707 C6-K51707 C7-K54603 C8-K51707 E9-K51707 E7-K51707
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 08:45 ON MON NO
SORT FIELDS=COPY
OUTFIL VTOF,BUILD=(1,4,1,4,HEX,C'|',170,HEX)
ICE201I G RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE162I 0 ICEIEXIT CHANGED ONE OR MORE OPTIONS IN EFFECT
ICE126A 9 INCONSISTENT REFORMATTING FOR SORTOUT : REASON CODE 02, IFTHEN 0
ICE751I 0 C5-K51707 C6-K51707 C7-K54603 C8-K51707 E9-K51707 E7-K51707
ICE052I 3 END OF DFSORT
******************************** BOTTOM OF DATA ********************************
ICE802I 0 BLOCKSET TECHNIQUE IN CONTROL
ICE201I G RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE150I 1 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
ICE162I 0 ICEIEXIT CHANGED ONE OR MORE OPTIONS IN EFFECT
ICE858I 0 LA=1495560, DA=1024, AA=1494536, BA=2029, CP=0, TA=2077
ICE859I 0 LB=9848, DB=1004, AB=8844, BB=0, CP=1, RS=0, TB=21
ICE860I 0 F=YN, P=2, M=N, B=2048
ICE751I 0 C5-K51707 C6-K51707 C7-K54603 C8-K51707 E9-K51707 C9-BASE E5-K55337
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 09:23 ON MON NO
OPTION VLSHRT
SORT FIELDS=COPY
OUTFIL BUILD=(1,4,1,4,HEX,C'|',170,HEX)
ICE201I G RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE150I 1 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
ICE162I 0 ICEIEXIT CHANGED ONE OR MORE OPTIONS IN EFFECT
ICE231I 0 STORAGE USED FOR OUTFIL : BELOW 16M = 21504, ABOVE 16M = 2126848
ICE855I 0 SORTOUT : TX=N, R=J, L=J, B= , BL=0, BR=0, DCT=37, VS=N, RU=X, SB=241
ICE210I 0 SORTOUT : EXCP USED, LRECL = 2052, BLKSIZE = 27998, TYPE = VB (SDB)
ICE218A 3 149 BYTE VARIABLE RECORD IS SHORTER THAN 169 BYTE MINIMUM FOR SORTOUT
ICE751I 1 EF-K49535 CB-K90014 F0-K49038 E8-K51707
ICE052I 0 END OF DFSORT
As I got from the manual of DFSORT:
as it is a VB dataset and we can not validly sort or merge on control fields with missing bytes because missing bytes have no value. VLSHRT is the option but it only helps putting binary zeroes (the zeroes are not kept for the output record) in place of missing control bytes thus allowing DFSORT to validly sort or merge on the short control fields.
Thanks Frank and other senior members for all your support. Kindly help me to get the answer of my previous post which will be very helpful to me.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
The error messages indicate you have "short" records, not nulls.
A short record means the length of the record is less than the length specified. For example, if the record length is 149 bytes, it mean the record has only 149 bytes. There are NO bytes present after the 149 bytes.
The VLSHRT option will allow sorting of short records.
At this point, I don't know what question you are trying to get answered.