View previous topic :: View next topic |
Author |
Message |
rajiv_garg08 Beginner
Joined: 24 Mar 2006 Posts: 6 Topics: 2
|
Posted: Tue Apr 04, 2006 9:29 am Post subject: Adding Header and Trailer in Easytrieve |
|
|
Hello Guys,
I want to write an easytrieve which checks for the Header and Trailor record of the input file (Files can be of any record length, only one easytrieve should be used for different files with different record length) and if header and trailor is not there then it adds the header and trailor by initializing all the fields of input files as zero if numeric and space if alphanumeric.
Can someone provide some help on this? Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Tue Apr 04, 2006 9:41 am Post subject: |
|
|
Please do not open more than 1 topic for the same question. I deleted your other duplicate posts.
Please answer the following questions.
1. How do you identify a header or trailer?
2. Does the header/trailer have a layout as you asked for initializing the fields based on their definition.
3. What is the max lrecl file you can have? Do you have any VB file?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
rajiv_garg08 Beginner
Joined: 24 Mar 2006 Posts: 6 Topics: 2
|
Posted: Wed Apr 05, 2006 10:04 am Post subject: |
|
|
I am sorry for duplicate posts
For Header trailor i find the solution. I want to use this easytrieve for any file layout. What i want is to enter the layout and want easytrive to read that layout, and initialize the layout fields to zero if thay are numeric and spaces if the fields are alphanumeric. Here i don't want to manually move 0 or space to individual fields. Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Wed Apr 05, 2006 10:27 am Post subject: |
|
|
Quote: |
For Header trailor i find the solution.
|
rajiv_garg08,
Can you post the solution so that we can also learn.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
rajiv_garg08 Beginner
Joined: 24 Mar 2006 Posts: 6 Topics: 2
|
Posted: Wed Apr 05, 2006 10:31 am Post subject: |
|
|
Its very simple. I have an account field which is always zero for header fields. When i read the file i check that field by if condition. If that field don't met condition, header missing. My main problem starts after that. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Wed Apr 05, 2006 10:32 am Post subject: |
|
|
rajiv_garg08,
I wanted to see how you are using multiple layouts and checking the header and initializing the fields without using a move statement.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
rajiv_garg08 Beginner
Joined: 24 Mar 2006 Posts: 6 Topics: 2
|
Posted: Fri Apr 07, 2006 3:51 am Post subject: |
|
|
I havn't used it for different file layouts. Still working on it |
|
Back to top |
|
 |
|
|