IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Checking LRECL of a VB file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sakthi_ksv

New User


Joined: 20 Jul 2006
Posts: 48
Location: Chennai

PostPosted: Mon Oct 29, 2007 3:16 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Oct 29, 2007 3:33 pm
Reply with quote

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
View user's profile Send private message
sakthi_ksv

New User


Joined: 20 Jul 2006
Posts: 48
Location: Chennai

PostPosted: Mon Oct 29, 2007 3:49 pm
Reply with quote

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
View user's profile Send private message
sakthi_ksv

New User


Joined: 20 Jul 2006
Posts: 48
Location: Chennai

PostPosted: Mon Oct 29, 2007 4:05 pm
Reply with quote

Could you please explain what do you mean by Trailer processing??

Thanks in advace,
Sakthi
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Oct 29, 2007 4:13 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Oct 29, 2007 4:17 pm
Reply with quote

sakthi_ksv wrote:
Could you please explain what do you mean by Trailer processing?
Could you please read about it first and then ask for help?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Oct 29, 2007 4:26 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Oct 29, 2007 4:49 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Oct 29, 2007 9:26 pm
Reply with quote

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
View user's profile Send private message
sakthi_ksv

New User


Joined: 20 Jul 2006
Posts: 48
Location: Chennai

PostPosted: Tue Oct 30, 2007 11:50 am
Reply with quote

thanks all
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts WER247A SORTOUT HAS INCOMPATIBLE LRECL SYNCSORT 7
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top