View previous topic :: View next topic
|
Author |
Message |
acrajesh
New User
Joined: 31 May 2007 Posts: 15 Location: Bangalore
|
|
|
|
I tried to insert the YYYYMM (Current Year and Month) value in a VB record file(LERCL = 2000, RECFM=VB). A particular record size is 88. The exact value to be inserted in that record is "CP=200906'. After insertion of the above given 9 character string, what happens is the last 9 characters are truncated?
Kindly help me onto this issue. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
did You change also the record length to he new value ?? |
|
Back to top |
|
|
acrajesh
New User
Joined: 31 May 2007 Posts: 15 Location: Bangalore
|
|
|
|
No, it remains 2000 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
review Your understanding of how variable length records work, please
the 2000 is the maximum logical record length, it is used/defined so that the program can properly allocate buffers for record processing
You should have defined in Your program an area 2000 bytes long
when You read/get the 88 bytes record, the length variable will contain 88
the record You try to build will be 88 + 9 ==> 97
You should change the record length var to 97 so that the write/put will write the correct record
/rant on
I wish that organization using VB record would give their employees proper training
all it takes is a handful of code snippets and samples
/rant off |
|
Back to top |
|
|
acrajesh
New User
Joined: 31 May 2007 Posts: 15 Location: Bangalore
|
|
|
|
thanks enrico,
if thats the case, then how to change the record length?
what happens is that there are so many records of different sizes and this happens to be of size 88 bytes. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
I just told You
for every record the variable will contain the proper length |
|
Back to top |
|
|
acrajesh
New User
Joined: 31 May 2007 Posts: 15 Location: Bangalore
|
|
|
|
the language of reference is PLI. they are not capturing the record length anywhere in the code. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
hard to believe |
|
Back to top |
|
|
acrajesh
New User
Joined: 31 May 2007 Posts: 15 Location: Bangalore
|
|
|
|
or maybe i dont know where its captured. do u have any sample code to show.
thanks |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
acrajesh wrote: |
or maybe i dont know where its captured. do u have any sample code to show. |
Excuse me, shouldn't YOU be showing YOUR code? |
|
Back to top |
|
|
acrajesh
New User
Joined: 31 May 2007 Posts: 15 Location: Bangalore
|
|
|
|
excuse me, we have ethics in practise. i am sure you understand. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
a better ethics would be to start doing a bit of work Yourself
I am sure You understand
and why not ask Your peers, You should not have any issue with them |
|
Back to top |
|
|
acrajesh
New User
Joined: 31 May 2007 Posts: 15 Location: Bangalore
|
|
|
|
thanks for your AWAKENING in this regard.
nice to see people like you in FORUM where we share and discuss things |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
follow on
I see from Your profile that Your only mainframe skill is Photography,
it would be wiser on Your side also to acquire some skill in IT related subjects |
|
Back to top |
|
|
acrajesh
New User
Joined: 31 May 2007 Posts: 15 Location: Bangalore
|
|
|
|
Thanks for your advice in this regard.
Its great to see such wise souls around, who answer everything apart from the question |
|
Back to top |
|
|
acrajesh
New User
Joined: 31 May 2007 Posts: 15 Location: Bangalore
|
|
|
|
Thanks for not giving any concrete ideas than FREE ADVICE |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
again.... did You care to look at the manual? |
|
Back to top |
|
|
|