View previous topic :: View next topic |
Author |
Message |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Tue Apr 24, 2007 6:29 pm Post subject: |
|
|
Quote: |
Thinking that there should be an alternative way in FTP step to strip spaces at the end.
|
sriramkarumuri,
The parm "NOTRAILingblanks" removes the trailing blanks during FTP
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
sriramkarumuri Beginner
Joined: 07 Feb 2006 Posts: 28 Topics: 7
|
Posted: Wed Apr 25, 2007 9:15 pm Post subject: |
|
|
Thanks all for your suggestions.
I got the solution by changing it as follows.
FD TXN-FILE
LABEL RECORDS ARE STANDARD
RECORD IS VARYING FROM 1 TO 30000 CHARACTERS
DEPENDING ON REC-LEN
BLOCK CONTAINS 0 RECORDS
RECORDING MODE IS V
DATA RECORD IS ELIG-MIG-REC.
" DEPENDING ON REC-LEN "
I moved the length of each record to REC-LEN before I write to file.
Sriram |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Apr 25, 2007 11:03 pm Post subject: |
|
|
sriramkarumuri,
thx for getting back to us with the resolution to your problem. It will help others and will motivate contributors to respond to your questions. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
jajularamesh Beginner
Joined: 14 Apr 2006 Posts: 87 Topics: 33
|
Posted: Mon May 14, 2007 2:21 am Post subject: |
|
|
FD ACCOUNT-OUT
RECORDING MODE IS V
RECORD IS VARYING IN SIZE FROM 1 TO 1939
DEPENDING ON ACCT-RECORD-SIZE.
You need to calculate the length of each record and store that value in the ACCT-RECORD-SIZE and then you need to write to ouput file.
Be careful ehile calculating the length of the record.sometimes people will be calculating the length by Right trimming spaces.This sometimes doesn't give the correct length as the last fileds in that particular record may be spaces.
Always follow this process to find the length.
Each and every record in a variable length file to a specific copy book so identify that field and find the copybook used to map for that record from that copy book find the length
ex
05 WS-RECORD-NAME-SW PIC X(50) VALUE 'N'.
88 SUMMARY VALUE 'ACCOUNT-SUMMARY'.
88 IDEN VALUE 'ACCOUNT-IDENTIFIER'.
88 SUMM-GRP VALUE 'ACCOUNT-SUMMARY-GROUP'.
88 ASCD VALUE 'ACCOUNT-SUMMARY-CUSTOMER-DETAILS'.
88 ASD VALUE 'ACCOUNT-SUMMARY-DISTRIBUTOR'.
88 ASCA VALUE 'ACCOUNT-SUMMARY-CUSTOMER-ADDRESS'.
88 ASDL VALUE 'ACCOUNT-SUMMARY-DISTRIBUTION-LOCATION'.
88 HEADER VALUE 'HEADER'.
88 TRAILER VALUE 'TRAILER'.
EVALUATE TRUE
WHEN SUMMARY
MOVE 753 TO ACCT-RECORD-SIZE
WHEN IDEN
MOVE 327 TO ACCT-RECORD-SIZE
WHEN SUMM-GRP
MOVE 542 TO ACCT-RECORD-SIZE
WHEN ASCD
MOVE 631 TO ACCT-RECORD-SIZE
WHEN ASD
MOVE 184 TO ACCT-RECORD-SIZE
WHEN ASDL
MOVE 230 TO ACCT-RECORD-SIZE
WHEN ASCA
MOVE 1939 TO ACCT-RECORD-SIZE
WHEN HEADER
MOVE 157 TO ACCT-RECORD-SIZE
WHEN TRAILER
MOVE 161 TO ACCT-RECORD-SIZE
WHEN OTHER
MOVE ZEROS TO ACCT-RECORD-SIZE
END-EVALUATE
I hope this will be helpful.Please let me know any other method which can be used to do the same
Regards,
Venkata Apparao Jajula |
|
Back to top |
|
 |
jajularamesh Beginner
Joined: 14 Apr 2006 Posts: 87 Topics: 33
|
Posted: Mon May 14, 2007 12:19 pm Post subject: |
|
|
I apologize for posting wrong methodology.
I followed that methodology which is also correct but it can be done more directly.
Sorry if my earlier post is misleading.I once again apologize |
|
Back to top |
|
 |
|
|