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
 

 

Truncation in VB file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
acrajesh

New User


Joined: 31 May 2007
Posts: 15
Location: Bangalore

PostPosted: Mon Jun 08, 2009 12:45 pm    Post subject: Truncation in VB file
Reply with quote

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

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 08, 2009 12:48 pm    Post subject: Reply to: Truncation in VB file
Reply with quote

did You change also the record length to he new value ??
Back to top
View user's profile Send private message
acrajesh

New User


Joined: 31 May 2007
Posts: 15
Location: Bangalore

PostPosted: Mon Jun 08, 2009 1:28 pm    Post subject:
Reply with quote

No, it remains 2000
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 08, 2009 1:34 pm    Post subject: Reply to: Truncation in VB file
Reply with quote

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

New User


Joined: 31 May 2007
Posts: 15
Location: Bangalore

PostPosted: Mon Jun 08, 2009 1:42 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 08, 2009 1:43 pm    Post subject: Reply to: Truncation in VB file
Reply with quote

I just told You icon_eek.gif

for every record the variable will contain the proper length
Back to top
View user's profile Send private message
acrajesh

New User


Joined: 31 May 2007
Posts: 15
Location: Bangalore

PostPosted: Mon Jun 08, 2009 1:55 pm    Post subject:
Reply with quote

the language of reference is PLI. they are not capturing the record length anywhere in the code.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 08, 2009 1:56 pm    Post subject: Reply to: Truncation in VB file
Reply with quote

hard to believe icon_eek.gif
Back to top
View user's profile Send private message
acrajesh

New User


Joined: 31 May 2007
Posts: 15
Location: Bangalore

PostPosted: Mon Jun 08, 2009 2:05 pm    Post subject:
Reply with quote

or maybe i dont know where its captured. do u have any sample code to show.
thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 08, 2009 2:12 pm    Post subject: Reply to: Truncation in VB file
Reply with quote

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IBM3LR50/12.0?SHELF=IBMSH350&DT=20061026145308

meditate on the record definition, should be a VARYING thing

a VARYING thing is structured as a 2 bytes binary length followed by data

Your buffer should be defined accordingly
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Mon Jun 08, 2009 2:12 pm    Post subject:
Reply with quote

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

New User


Joined: 31 May 2007
Posts: 15
Location: Bangalore

PostPosted: Mon Jun 08, 2009 2:46 pm    Post subject:
Reply with quote

excuse me, we have ethics in practise. i am sure you understand.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 08, 2009 2:52 pm    Post subject: Reply to: Truncation in VB file
Reply with quote

a better ethics would be to start doing a bit of work Yourself
I am sure You understand icon_cool.gif

and why not ask Your peers, You should not have any issue with them
Back to top
View user's profile Send private message
acrajesh

New User


Joined: 31 May 2007
Posts: 15
Location: Bangalore

PostPosted: Mon Jun 08, 2009 2:56 pm    Post subject:
Reply with quote

thanks for your AWAKENING in this regard.
nice to see people like you in FORUM where we share and discuss things
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 08, 2009 2:57 pm    Post subject: Reply to: Truncation in VB file
Reply with quote

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

New User


Joined: 31 May 2007
Posts: 15
Location: Bangalore

PostPosted: Mon Jun 08, 2009 3:03 pm    Post subject:
Reply with quote

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

New User


Joined: 31 May 2007
Posts: 15
Location: Bangalore

PostPosted: Mon Jun 08, 2009 3:07 pm    Post subject:
Reply with quote

Thanks for not giving any concrete ideas than FREE ADVICE
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 08, 2009 3:10 pm    Post subject: Reply to: Truncation in VB file
Reply with quote

again.... did You care to look at the manual?
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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