View previous topic :: View next topic
|
Author |
Message |
sakthi_ksv
New User
Joined: 20 Jul 2006 Posts: 48 Location: Chennai
|
|
|
|
I have a VB file which will have a maximum record lenght if 122. In JCL I want to check, what is the maximum record length of this file with the newly inserted records. i.e a job will insert records or creates this file with some number of records at one step. In the next step I want to check the maximum record length of this file. If it is less than 90, then no problem.
If it is more than 90, I have to do some processing (this can be done by using FILEAID in batch mode). I would like to know, how to find the max record length of the file.
Sakthi. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
The lrecl is binary two bytes beginning at 1, a sort copy to dummy and trailer processing for the max value should get you what you want..... |
|
Back to top |
|
|
sakthi_ksv
New User
Joined: 20 Jul 2006 Posts: 48 Location: Chennai
|
|
|
|
Hi,
Thanks for the quick response. But I couldnt understand your reply. Could you please explain it clearly?
Thanks and Regards,
Sakthi. |
|
Back to top |
|
|
sakthi_ksv
New User
Joined: 20 Jul 2006 Posts: 48 Location: Chennai
|
|
|
|
Could you please explain what do you mean by Trailer processing??
Thanks in advace,
Sakthi |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
sakthi,
Quote: |
I would like to know, how to find the max record length of the file.
|
This can be done using the STATS operator of ICETOOL.
Code: |
STATS FROM(VBIN) ON(VLEN) ON(5,2,PD) |
|
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
sakthi,
Use this instead of my last post.
Code: |
STATS FROM(INP) ON(VLEN)
|
Where INP is the DD name of the input VB dataset. This would give you the maximum record length. You can write it into a dataset and use that for further checks. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
In JCL I want to check, what is the maximum record length of this file with the newly inserted records. i.e a job will insert records or creates this file with some number of records at one step. In the next step I want to check the maximum record length of this file. If it is less than 90, then no problem.
|
how silly is this question? Why can't you check the size of each record as it is inserted and generate an advice if it is greater than 90, even though the max length is 122 (118 + vli). And if you really need to manipulate this file if something inserts a record > 90, why don't you do the manipulation then instead of after the fact? Is this a homework quesiton?
Processing after the fact is poor design. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Sakthi,
If you want the maximum in one FB/80 output record, you can use this DFSORT job:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,VTOF,BUILD=(80X),
TRAILER1=(MAX=(1,2,BI,EDIT=(TTTTT)))
/*
|
As an example, if the maximum record length is 84, SORTOUT will have one 80-byte record with:
00084 |
|
Back to top |
|
|
sakthi_ksv
New User
Joined: 20 Jul 2006 Posts: 48 Location: Chennai
|
|
|
|
thanks all |
|
Back to top |
|
|
|