IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Lenerror in CICS VSAM


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 26, 2012 9:31 pm
Reply with quote

Quote:
Whats wrong with Linkage Section for a program that reads a file!?


considering the competence of the poster,
obviously confusing and an unnecessary complication

plus, why use linkage? not a good habit.
it is the same as using the FD for a file record.

though in the case of CICS,
i believe CICS issues a GETMAIN for the structure
and moves the data to the newly acquired storage
and must set a POINTER.
a lot of overhead to save 80 bytes in working-storage.

have to use working-storage for a rewrite if length is changed anyway.

if there is a problem, the dump also has to include the GETMAINed storage
else you don't have the record
whereas if it is in working-storage,
there is a chance that it can be found.

it may be your habit,
but i do not consider it good programming practice.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 26, 2012 9:57 pm
Reply with quote

I haven't coded for a while, but I'd like to throw this into the mix as a possibility and DBZ may not like this. icon_wink.gif

Define an 01 area in LINKAGE (length of 256 to be safe), define a WS halfword-length and set it to ZERO.

Issue the READ with a SET(ADDRESS OF 01 LINKAGE AREA) and the actual record-length will be set in the halfword.

Move the 01 LINKAGE area to the 01 WORKING-STORAGE area, using reference modification, based upon the halfword-length.

Then, calculate the ODO based upon the halfword-length.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 26, 2012 11:21 pm
Reply with quote

as a final thought,

Peter,
the only reason we are having this discussion

(and yes,
in CICS modules
I occasionally use linkage and do getmains
but still consider it poor programming practice,
because it takes a competent person to follow me
when I code that way)


is because the TS is a poorly trained, inexperienced COBOL programmer.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top