I have one file , i am copying particular column to another file, in some column there may be blanks, now i want to elimate the blank rows in the
copied file, i tried with Omit , It is not working.
In the above JCL i am sorting and copying a particular Column to another file , there in the copied file i am getting some blank lines , i dont want that blank lines also , this was my requirement
InPut dataset details
General Data Current Allocation
Management class . . : DEV Allocated cylinders : 3
Storage class . . . : DEV1000 Allocated extents . : 1
Volume serial . . . : 9SDS3D
Device type . . . . : 3390
Data class . . . . . : ADDDSORG Current Utilization
Organization . . . : PS Used cylinders . . : 3
Record format . . . : FB Used extents . . . : 1
Record length . . . : 450
Block size . . . . : 27900
1st extent cylinders: 3
Secondary cylinders : 10
Data set name type : SMS Compressible : NO
Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
I think you want only the contents from position 321 and length 8 in output by sorting in ascending order with no duplicates. The following sort card will help you for this.
In my Output file previously when i run i use to get 2 blank lines, but
now even after running the program using the code which you have send
still i am getting one blank line.
Madhu Reddy
Do you want to check for blank fields from 321 to 8 bytes or from 1 to 10 bytes of the i/p file?
shankar.v's JCL is checking for blanks from 321 to 328,
and the JCL that you have shown its checking blanks from 1 to 10
If needed you can check for blank's in both the positions that is 321,8 and 1,10, as shown below
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
In my Output file previously when i run i use to get 2 blank lines, but
now even after running the program using the code which you have send
still i am getting one blank line.
Please suggest me the solutions.
It's very difficult to give you a solution because you haven't really described what you're trying to do, what your input records look like, etc.
But as a guess, try these DFSORT control statements to eliminate your blank lines:
Code:
SORT FIELDS=(321,8,CH,A),EQUALS
SUM FIELDS=NONE
OUTREC FIELDS=(1:321,8)
OUTFIL OMIT=(1,8,CH,EQ,C' ')
The OUTFIL OMIT will remove any output lines with blanks in positions 1-8 that remain after SORT and SUM.
It would be more efficient to remove the blank lines before sorting and I would think that the following control statements suggested by Krisprems would do that:
Code:
OMIT COND=(321,8,CH,EQ,C' ')
INREC FIELDS=(321,8)
SORT FIELDS=(1,8,CH,A)
SUM FIELDS=NONE
But you say you still have one blank line with those control statements - I don't see how unless you mean something by "blank line" that makes no sense.
It would really help if you would answer the questions people ask, show your input and output, etc. In other words, give the information people need to provide a solution rather than making them guess at what you want.
I have one file with many rows and columns, i want to copy one particular
column to another file, sort and eliminate duplicates, Up to this my program is working fine, but in the output file, the first row is blank
i should not get this.
the output looks like this