Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Checking LRECL of a VB file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Checking LRECL of a VB file
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: 2150
Location: At my coffee table

PostPosted: Mon Oct 29, 2007 3:33 pm    Post subject:
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    Post subject: Reply to: Checking LRECL of a VB file - Urgent.........
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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Mon Oct 29, 2007 4:13 pm    Post subject: Reply to: Checking LRECL of a VB file
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: 2150
Location: At my coffee table

PostPosted: Mon Oct 29, 2007 4:17 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Mon Oct 29, 2007 4:26 pm    Post subject: Reply to: Checking LRECL of a VB file
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    Post subject:
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 Moderator


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

PostPosted: Mon Oct 29, 2007 9:26 pm    Post subject:
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    Post subject: Reply to: Checking LRECL of a VB file
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us