MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Issue with Variable length file
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Tue Apr 24, 2007 6:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sriramkarumuri
Beginner


Joined: 07 Feb 2006
Posts: 28
Topics: 7

PostPosted: Wed Apr 25, 2007 9:15 pm    Post subject: Reply with quote

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


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Apr 25, 2007 11:03 pm    Post subject: Reply with quote

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


Joined: 14 Apr 2006
Posts: 87
Topics: 33

PostPosted: Mon May 14, 2007 2:21 am    Post subject: Reply with quote

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


Joined: 14 Apr 2006
Posts: 87
Topics: 33

PostPosted: Mon May 14, 2007 12:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group