View previous topic :: View next topic
|
Author |
Message |
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
This thread is added in "Set a bookmark for this topic" for me... . Thanks Robert. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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
Regards,
Anuj |
|
Back to top |
|
|
grabeva
New User
Joined: 07 Sep 2006 Posts: 23
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
grabeva
New User
Joined: 07 Sep 2006 Posts: 23
|
|
|
|
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 |
|
|
|