Posted: Thu Aug 30, 2007 4:38 am Post subject: copying header,specific records and trailer
Hi,
I have tape file with header,records and trailer. I want to copy header and specific records and trailer to dasd dataset. I have written the following jcl. But its giving syntax error. Please correct my jcl. The tape data set is Variable length.
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 10:47 ON THU AUG 30, 2007 -
SORT FIELDS=COPY
RECORD TYPE=V
OUTFIL FILES=01,
INCLUDE=(5,1,CH,EQ,X'00'),
OUTREC=(1:1,4,5,31)
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Thu Aug 30, 2007 4:52 am Post subject:
nadh,
please use [code] and [/code] tags,it makes your posts easier to read. For info use this link for BBCode.
Use the search facility, this type of processing has been discussed numerous times on this board. You should also look at each 'Sticky' in the DFSORT forum (which is where this topic belongs). There are many examples there, as well as in the manuals (links for manuals provided in appropriate Sticky as well as the 'Quick Manuals' hyperlink at top of page). Your topic is the subject of an example in the quick starts manual. _________________ Dick Brenholtz
American living in Varel, Germany
Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Thu Aug 30, 2007 5:12 am Post subject:
Quote:
ICE218A 3 49 BYTE VARIABLE RECORD IS SHORTER THAN 1111 BYTE MINIMUM FOR SORTOF02 FIELDS
Nadh,
Did you want the SORTOF02 a Fixed block(FB) file or Variable Block(VB) file. If you want VB file then just remove the OUTREC statement. Use these control cards
Code:
SORT FIELDS=COPY
RECORD TYPE=V
OUTFIL FILES=01,
INCLUDE=(5,1,CH,EQ,X'00'),
OUTREC=(1:1,4,5,31)
But, its copying the acutal trailer where i need to update the record count. Since data set is huge its automaticaly opening in browse mode. is there any way to update it through sort itself?
OUTFIL FILES=01 is for header
OUTFIL FILES=03 is for trailer in sort conditions above. The trailer record format is
01 MDMS-MSAVER-HIST-TRLR.
03 FILLER PIC X(27).
03 MDMS-R-COUNT PIC S9(9) COMP-3.
So I need to update the record cound in trailer from 28th position in record.
Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Thu Aug 30, 2007 7:20 am Post subject:
nadh,
Is the total on trailer consider the header and trailer record also into account? or just the detail record count?Also do you need the contents of header as is from the input file or can we generate them writing them to output?
In your definition you showed the trailer had 27 bytes of filler. What is the contents of that filler? is it all low-values ? or any thing specific?
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Aug 31, 2007 11:21 am Post subject:
nadh,
Just showing us YOUR attempt at the job doesn't really tell us what we need to know. I suspect you can do this in less passes using DFSORT's IFTHEN clauses. But to help us give you the best solution, it would really help if you would show an example of your input records and what you expect for output, give the RECFM and LRECL of the input file, and give the position, length and format of all relevant fields. _________________ 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
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