Posted: Wed May 14, 2003 10:07 am Post subject: File-aid Batch help
Hi ,
Can somebody help me with a batch jcl for file aid to create a
file layout.I've data (2 records in the input) and I've the copybook for data.
I need file-aid batch jcl that would produce when we use map(ex: feild name & data value)
option in file-aid
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed May 14, 2003 10:54 am Post subject:
vijay,
The following JCl will give you the desired results.
Code:
//**********************************************************************
//* THE $$DD01 PARAMETER IS ESSENTIAL FOR FILE AID *
//* THE DD STATEMENT DD01 = INPUT FILE *
//* THE DD STATEMENT DD01M = COBOL LAYOUT DATA SET NAME *
//* THE MAP PARAMETER OPTION IS THE MEMBER IN COBOL LAYOUT DSN *
//* THE OUT PARAMETER SPECIFIES THE NUMBER OF RECORDS THAT YOU NEED *
//* A VALUE OF 0 MEANS ALL THE RECORDS EXISTING IN THE FILE *
//* IF YOU SKIP THIS FIELD THE DEFAULT NUMBER OF RECORDS(250) GET *
//* PRINTED. *
//* THE DSN IN THE DD STATEMENT SYSLIST IS WHERE THE OUTPUT OF THIS *
//* JOB GOES *
//**********************************************************************
//STEP01 EXEC PGM=FILEAID
//*
//SYSLIST DD DSN=YOUR OUTPUT PRINT FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=PROD,
// SPACE=(CYL,(X,Y),RLSE),
// DCB=(RECFM=FBA,LRECL=133,BLKSIZE=27930)
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//DD01 DD DSN=YOUR INPUT FILE,
// DISP=SHR
//DD01M DD DSN=YOUR COPYLIB PDS,
// DISP=SHR
//DD01O DD SYSOUT=*
//SYSIN DD *
$$DD01 FPRINT MAP=COPYLIB MEMBERNAME,OUT=0
//*
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Sun Mar 27, 2005 9:08 am Post subject:
hari haran,
You need to use the FIELDS parm to print specific columns. The VPRINT report output width is 132 characters. When the VPRINT output exceeds the report width, you get a VP001-Data truncation error. This can be solved using the FIELDS parameter to specify which fields to include in the VPRINT output.
This example prints all the records in vertical formatted mode,using the EMPLOYEE layout. The FIELDS parameter specifies to include only field numbers 1,2,3,6, and 10 in the output.
I need the same type of cobol copybook translation. how does the following JCL work? Will this give me the starting and ending positions, variable names, and formats?
My copybook is 't1i0.carlton.copybook(h99yb338).
The output translation should go to 't1i0.carlton.output(h99yb338).
I'm not sure why I should name the input file? What will this do?
Carlton
Code:
//**********************************************************************
//* THE $$DD01 PARAMETER IS ESSENTIAL FOR FILE AID *
//* THE DD STATEMENT DD01 = INPUT FILE *
//* THE DD STATEMENT DD01M = COBOL LAYOUT DATA SET NAME *
//* THE MAP PARAMETER OPTION IS THE MEMBER IN COBOL LAYOUT DSN *
//* THE OUT PARAMETER SPECIFIES THE NUMBER OF RECORDS THAT YOU NEED *
//* A VALUE OF 0 MEANS ALL THE RECORDS EXISTING IN THE FILE *
//* IF YOU SKIP THIS FIELD THE DEFAULT NUMBER OF RECORDS(250) GET *
//* PRINTED. *
//* THE DSN IN THE DD STATEMENT SYSLIST IS WHERE THE OUTPUT OF THIS *
//* JOB GOES *
//**********************************************************************
//STEP01 EXEC PGM=FILEAID
//*
//SYSLIST DD DSN=YOUR OUTPUT PRINT FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=PROD,
// SPACE=(CYL,(X,Y),RLSE),
// DCB=(RECFM=FBA,LRECL=133,BLKSIZE=27930)
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//DD01 DD DSN=YOUR INPUT FILE,
// DISP=SHR
//DD01M DD DSN=YOUR COPYLIB PDS,
// DISP=SHR
//DD01O DD SYSOUT=*
//SYSIN DD *
$$DD01 FPRINT MAP=COPYLIB MEMBERNAME,OUT=0
//*
*** END OF LAYOUT REPORT ***
******************************** BOTTOM OF DATA ************************
Hope this helps
Cheers
Quote:
Kolusu posted
This example prints all the records in vertical formatted mode,using the EMPLOYEE layout. The FIELDS parameter specifies to include only field numbers 1,2,3,6, and 10 in the output.
I remember a day when I had to print the data selectively. I know that we can do selective print using FILEAID, but I don't know how to. So I copied the required fields using SORT, and then created a copy book with the new layout and then printed out the result.
Can we see similar funtionality thru online Fileaid too. Just see the columns in BROWSE mode giving selected fields.
You need to use the FIELDS parm to print specific columns. The VPRINT report output width is 132 characters. When the VPRINT output exceeds the report width, you get a VP001-Data truncation error. This can be solved using the FIELDS parameter to specify which fields to include in the VPRINT output.
This example prints all the records in vertical formatted mode,using the EMPLOYEE layout. The FIELDS parameter specifies to include only field numbers 1,2,3,6, and 10 in the output.
Hope this helps...
Cheers
Kolusu
Still the data is getting truncated.
VP001-DATA TRUNCATION OCCURRED WHILE PROCESSING YOUR VPRINT REQUEST.
I included the field names and increased the LRECL of SYSLIST to 250.
$$DD01 VPRINT OUT=0,MAP=member1,FIELDS=(2,4,6-10,11,12,13,14)
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Feb 08, 2007 11:14 am Post subject:
Ravi,
what is the total length of the fields 2,4,6-10,11,12,13,14 ? With VPRINT it automatically converts the non displayable numeric fields(comp, comp-3...) to readable format and the length is doubled in this case. Also remember that vprint adds 1 space between fields for a better display. You have 11 fields in your display so that accounts for 11 additional bytes.
With all these I guess you crossed the limit of 132 bytes and hence the truncation.
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