MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File-aid Batch help

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
vijay
Beginner


Joined: 09 May 2003
Posts: 131
Topics: 64

PostPosted: Wed May 14, 2003 10:07 am    Post subject: File-aid Batch help Reply with quote

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

vijay
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed May 14, 2003 10:54 am    Post subject: Reply with quote

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
//*


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
hari haran
Beginner


Joined: 22 Jun 2004
Posts: 10
Topics: 4

PostPosted: Sat Mar 26, 2005 5:16 pm    Post subject: Reply with quote

Hi,

The same Fileaid batch job when tried in Vertical Format mode, results in Data Truncation when the output length exceeds 133 bytes.

Control Card :
Code:

$$DD01 VPRINT  MAP=QKUMONTH,OUT=0


Truncation Message :
Code:

VP001-DATA TRUNCATION OCCURRED WHILE PROCESSING YOUR VPRINT REQUEST.


Is there anyway by which we can print the whole file even if it exceeds the 133 byte limit in VFMT?

Thanks,
Hari.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sun Mar 27, 2005 9:08 am    Post subject: Reply with quote

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.

Ex:
Code:

$$DD01 VPRINT OUT=0,LAYOUT=EMPLOYEE,FIELDS=(1-3,6,10)


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
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
colbertc
Beginner


Joined: 30 Nov 2005
Posts: 2
Topics: 0

PostPosted: Fri Dec 02, 2005 2:43 pm    Post subject: Reply with quote

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
//*
Back to top
View user's profile Send private message
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Fri Dec 02, 2005 4:07 pm    Post subject: Reply with quote

colbertc,

If you want the layout like you see in Fileaid Option 8
then you can use Fileaid Option 5.4
Or try using the below code

Say my copy book is
Code:

BROWSE    MY.COPY.LIB(MYCOPY) - 01.00
Command ===>
******************************** Top of Data ***
 dcl 1 my_layout,
     2 my_char   char(10),
     2 my_int    fixed bin(31),
     2 my_small_int fixed bin(15),
     2 my_decimal  fixed decimal(5,2);
******************************* Bottom of Data *


Submit the job using below step
Code:

//JS10     EXEC PGM=FILEAID
//SYSPRINT DD  SYSOUT=*
//SYSLIST  DD  SYSOUT=*
//DD01     DD  DSN=MY.COPY.LIB,
//             DISP=SHR
//SYSIN    DD  *
$$DD01 RLPRINT MEMBER=(MYCOPY)
/*


Code:

********************************* TOP OF DATA ************************

02 DEC 2005             FILE-AID 8.9.0 PRINT FACILITY    16:09:21  PAGE     1
                             RECORD LAYOUT REPORT

 RECORD LAYOUT DATASET : MY.COPY.LIB
 MEMBER                : MYCOPY

------- FIELD LEVEL/NAME ---------- --PICTURE--    FLD  START     END  LENGTH
MY_LAYOUT                                                   1      21      21
2 MY_CHAR                             CHAR(10)       1      1      10      10
2 MY_INT                              BFX(31)        2     13      16       4
2 MY_SMALL_INT                        BFX(15)        3     17      18       2
2 MY_DECIMAL                          DFX(5,2)       4     19      21       3

     *** 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.
Confused Can we see similar funtionality thru online Fileaid too. Just see the columns in BROWSE mode giving selected fields.
Back to top
View user's profile Send private message
colbertc
Beginner


Joined: 30 Nov 2005
Posts: 2
Topics: 0

PostPosted: Fri Dec 02, 2005 6:39 pm    Post subject: Reply with quote

Using the below program, how can I direct the output to a file? I would like to read in the output list and create a SAS input statement.

Carlton
Code:

//JS10     EXEC PGM=FILEAID
//SYSPRINT DD  SYSOUT=*
//SYSLIST  DD  SYSOUT=*
//DD01     DD  DSN=MY.COPY.LIB,
//             DISP=SHR
//SYSIN    DD  *
$$DD01 RLPRINT MEMBER=(MYCOPY)
/*
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Dec 03, 2005 8:45 am    Post subject: Reply with quote

Quote:

Using the below program, how can I direct the output to a file? I would like to read in the output list and create a SAS input statement.


colbertc,

All you need to do change in the above JCL is the SYSLIST allocation to a dataset instead of sysout

i.e
Code:

//SYSLIST  DD DSN=YOUR OUTPUT FILE LAYOUT DEF FILE,     
//            DISP=(NEW,CATLG,DELETE), 
//            UNIT=SYSDA,               
//            SPACE=(CYL,(1,1),RLSE)   


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Dec 03, 2005 8:51 am    Post subject: Reply with quote

Quote:

Can we see similar funtionality thru online Fileaid too. Just see the columns in BROWSE mode giving selected fields.


Ravi you can do use the display command to show only specified columns in file-aid.

for example if you want to see only 1, 4, 5,8 column data only then simply type like this on the command prompt

Code:

DISPLAY 1,4,5,8 ONLY


This will only show the columns 1,4,5,8 only .

If you want to specify a range of columns(1 thru 6) and columns 15 and 27 then you can specify
Code:

DISPLAY 1-6,15,27 ONLY


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Wed Dec 07, 2005 10:13 am    Post subject: Reply with quote

Laughing Wowwwww!! Thanks a ton.. It helps really. Mr. Green
Back to top
View user's profile Send private message
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Thu Feb 08, 2007 10:12 am    Post subject: Reply with quote

Posted: Sun Mar 27, 2005 9:08 am
Quote:

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.

Ex:
Code:

$$DD01 VPRINT OUT=0,LAYOUT=EMPLOYEE,FIELDS=(1-3,6,10)



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)

The LRECL of the input file is 229.
Code:

//STEP01   EXEC PGM=FILEAID
//SYSLIST  DD  DSN=USERID.OUTPUT.PRINT.FILE,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(CYL,(1,1),RLSE),
//             DCB=(RECFM=FBA,LRECL=250,BLKSIZE=25000)
//SYSUDUMP DD  SYSOUT=*
//SYSPRINT DD  SYSOUT=*
//SYSTOTAL DD  SYSOUT=*
//DD01     DD  DSN=USERID.INPUT.FILE,
//             DISP=SHR
//DD01M    DD  DSN=USERID.FILE.LAYOUT,
//             DISP=SHR
//DD01O    DD  SYSOUT=*
//SYSIN    DD  *
$$DD01 VPRINT OUT=0,MAP=MEMBER1,FIELDS=(2,4,6-10,11,12,13,14)


Thank you,
Ravi.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Feb 08, 2007 11:14 am    Post subject: Reply with quote

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.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Thu Feb 08, 2007 12:19 pm    Post subject: Reply with quote

So we cannot print more than 132 bytes as a report. Sad
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Feb 08, 2007 9:27 pm    Post subject: Reply with quote

Ravi wrote:
So we cannot print more than 132 bytes as a report. Sad


Ravi,

Why not use SORT to create the report?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Mon Feb 12, 2007 5:05 pm    Post subject: Reply with quote

Yes! I got that done with SORT.
But as we added other funtionality to the code I did that thru SAS.

Thanks for your immediate help...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group