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

LRECL parameter in Dynamic Allocation routine.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jul 06, 2009 7:43 pm
Reply with quote

This thread is added in "Set a bookmark for this topic" for me... icon_smile.gif. Thanks Robert. icon_smile.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jul 06, 2009 7:48 pm
Reply with quote

Hope it helps, Anuj! The code I posted was tested and is known to work, although I did not add the CLOSE and BPXWDYN FREE commands. On the other hand, reading the BPXWDYN documentation should make the FREE command fairly obvious. And at least the dynamic file was fixed length in this case, which simplified processing somewhat.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jul 06, 2009 7:57 pm
Reply with quote

Yes it does help. Actually, I was never in such a need to dynamically allocate files using COBOL/BPXWDYN so never used that. I'll experiment with that in my "free time" or over the weekend to explore more, though I've seen code using that but I was a "passer by"...

Have a good one icon_smile.gif

Regards,
Anuj
Back to top
View user's profile Send private message
grabeva

New User


Joined: 07 Sep 2006
Posts: 23

PostPosted: Mon Oct 26, 2009 11:07 pm
Reply with quote

Hello,

i do a cobol program how invoke at BPXWDYN,
i need to alloc dynamic GDGs with LRECLs variable.....

but give me un error.....can somebody help me....thanks...Gra

2000-PROCESO
2200-VER-CONTROL
3000-ABRIR-ARCHIVO
SVCALLOC-I-DSN TSBA.XT.DI.REGIMEN.SISCEN(+1)
SVCALLOC-I-LRECL 00168
BPXWDYN --- SALIDA POR ERROR
BPXWDYN CODIGO ERROR: 000000002}
BPXWDYN PARAMETROS ENVIADOS: ALLOC FI(SALIDA) DA(TSBA.XT.DI.REGIMEN.SISCEN(+1)) NEW CATALOG SPACE(1,1) CYL BLKSIZE(0) RECFM(FB)LRECL=00168

FIN
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 27, 2009 12:14 am
Reply with quote

1. LRECL(168) instead of LRECL=00168
2. You must add GDGNT to your allocation string or the (+1) will be taken as a member name and the allocation failed.
Back to top
View user's profile Send private message
grabeva

New User


Joined: 07 Sep 2006
Posts: 23

PostPosted: Wed Oct 28, 2009 9:45 pm
Reply with quote

thanks, its Ok now...

I have another question, if I have an error, I want to display a good message from the output of the job, you know if have some module that gives me the error ????

For example, I want to delete the file if I have an error,
I put pathdisp(keep,delete),
and I have the following error....."BPXWDYN WS-BPXWDYN-COD: - 32742 "

I want to look for that error, but I didn't find it.....

If I include msg(wtp), in the jcl, do I need a sysout?
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 -> COBOL Programming Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts WER247A SORTOUT HAS INCOMPATIBLE LRECL SYNCSORT 7
No new posts VB to FB - Finding LRECL SYNCSORT 4
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
Search our Forums:

Back to Top