Print only selected fields in fileaid



Compuware's data management products: File-AID for IMS, File-AID/MVS, File-AID for DB2 and DBA-XPERT for DB2

Print only selected fields in fileaid

Postby needhelp » Tue Apr 05, 2011 1:01 am

I am attempting to use the print option (Print file contents), then data file (1 Data File - Print the contents of a data file:
in formatted mode using record layout
in vertical formatted mode using record layout
in three-line hexadecimal mode
in single-line character mode ) in fileaid to print to a file.

Out of 328 fields, I only want to print 7 of them to the file. I am using vfmt, record layout, and selection criteria. In addition to my values I am selecting I am also doing a DISPLAY of the fields I want to keep.

The fields I want to keep show up when I do 'DISPLAY 2,4,31,33,38,39,105 ONLY', when building the selection criteria, but when I submit the job to print to a file, ALL the fields are being written to the file. How do I get ONLY the fields I want to print to the file, or can it not be done in fileaid?
needhelp
 
Posts: 21
Joined: Thu Dec 30, 2010 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Print only selected fields in fileaid

Postby mprobst » Tue Apr 05, 2011 9:38 pm

If you are using VFMT you can simply enter VPRINT and the number of records you would like to print. As in: VPRINT 10 to print the next 10 records from your current position in the file.
The same works in FMT mode only you would use FPRINT 10.
mprobst
 
Posts: 5
Joined: Tue Apr 05, 2011 9:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Print only selected fields in fileaid

Postby needhelp » Tue Apr 05, 2011 10:26 pm

It's not the number of records that is the issue, it is the number of fields within the record. I am getting all the records, but I want only 7 of the fields, not all 328.
needhelp
 
Posts: 21
Joined: Thu Dec 30, 2010 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Print only selected fields in fileaid

Postby Robert Sample » Wed Apr 06, 2011 12:53 am

VPRINT FIELDS=(2,4,31,33,38,39,105)
will work as long as you've defined the layout properly.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Print only selected fields in fileaid

Postby mprobst » Wed Apr 06, 2011 1:54 am

If you are doing this thru ISPF, and you have your 7 fields narrowed down by entering 'DISPLAY 2,4,31,33,38,39,105 ONLY'
THEN use VPRINT with the number of records you would like to print and it will cause only the 7 fields for that many records to print.
(it works the same way in formated mode. The only difference is FPRINT vs VPRINT)
mprobst
 
Posts: 5
Joined: Tue Apr 05, 2011 9:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Print only selected fields in fileaid

Postby needhelp » Wed Apr 06, 2011 3:18 am

Thank you Robert Sample. That was the syntax I was looking for. I had to modify the JCL that fileaid created to add this to it.
//SYSIN DD *
$$DD01 VPRINT SHOW=FORMAT,LAYOUT=XXXXXX,TRUNC=NO,
FILLER=ON,ZERO=OFF,FIELDS=(2,4,31,33,38,39,105)
/*
needhelp
 
Posts: 21
Joined: Thu Dec 30, 2010 9:37 pm
Has thanked: 0 time
Been thanked: 0 time


Return to File-AID

 


  • Related topics
    Replies
    Views
    Last post