Home > Archive > ASM370 > May 2004 > DFsort + dynamic allocation
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
DFsort + dynamic allocation
|
|
| j?rg brehe 2004-04-28, 7:30 am |
| Plattform OS/390
I have a little problem. I allocate dynamically a dataset with
DISP (New,delete,delete), DDName=CNTL1, DSNAME=&&CNTL1
in an assembler program. IF I use DDNAME=DFSPARM I get an error.
Dataset in use.
In the JCL I have written
//STEP01 EXEC PGM=A1PO001 our mainprogram
//KARTE DD *
| |
| j?rg brehe 2004-04-28, 12:37 pm |
| Joerg.Brehe@set-software.de (j?rg brehe) wrote in message news:<7f6b3f56.0404280257.160d5ead@posting.google.com>...
> Plattform OS/390
>
> .
> //DFSPARM DD DSN=&&CNTL1,DISP=(NEW,PASS,DELETE)
>
It seems, I never need this statement. I can alloccat the Dataset
with the DDNAME= DFSPARM and use these Dataset with my parms.
However I have a new problem. how can I find out, if our customer use
DFSORT or Syncsort?
Jörg
| |
| j?rg brehe 2004-04-29, 9:53 am |
| > I believe the problem is that the JCL already has the DFSPARM DDName
> allocated at the time you tried to dynamically allocate DFSPARM.
> That's why you get the dynamic allocation failure. When you
> dynamically allocate DDName CNTL1, SORT doesn't care about that; it
> reads the DFSPARM file allocated by the JCL. This is probably a null
> file and SORT is using default parameters. (Can you verify that.) Why
> don't you just IEBGENER the sort parms you want into a temp file in a
> step prior to STEP01 and pass that file to the step STEP01. (Plus
> remove your call to DYNPROG from ASPO034 - or just leave it in since
> it uselessly creates DDName CNTL1 that nobody reads.)
Yes, you are right. the dataset DFSPARM is allocated before I have
tried to dynamically allocate DFSPARM. Now I allocate the dataset
dynamical I have purge the JCL statement. I have found, sort use the
right dataset, my dataset.
I must use this method, because I have many sorts and the filsz and
Avgrlen I know only before i call the sort. I must clean the dataset
before the next sort and put in the lines with filesize and average
length. DFSORT and SYNCSORT works smarter if I can tell him these
parameters.
But I have one problem, I don't know if our customers use DFSORT Oor
Syncsort.
The other way: i use the JCL statement. I don't allocate dynamically.
I read the JCl and found the label DFSPARM or $ORTPARM and write the
lines into these datasets.
jörg
| |
| Colin Campbell 2004-04-30, 12:20 am |
| Joerg,
You could always write the "facts" that you want Sort to know into both
data sets. Then, whichever Sort program is in use will read its
preferred input options file.
Or, you could use SELECT OPTIONAL with a file status clause defined and
open the two data sets for input, i-o, or extend. File Status will be
'00' if the file can be opened successfully, and '05' if the file is
missing. (For i-o or extend, the file will have been created if you use
the CBLQDA run time option.)
| |
| P. Cress 2004-05-03, 1:49 pm |
| Joerg.Brehe@set-software.de (j?rg brehe) wrote in message news:<7f6b3f56.0404280257.160d5ead@posting.google.com>...
> Plattform OS/390
>
> I have a little problem. I allocate dynamically a dataset with
> DISP (New,delete,delete), DDName=CNTL1, DSNAME=&&CNTL1
> in an assembler program. IF I use DDNAME=DFSPARM I get an error.
> Dataset in use.
>
> In the JCL I have written
>
> //STEP01 EXEC PGM=A1PO001 our mainprogram
> //KARTE DD *
> .
> .
> //DFSPARM DD DSN=&&CNTL1,DISP=(NEW,PASS,DELETE)
>
> In our mainprogramm I call my
> Cobolprogram A5po257 which calls the assembler program to allocate the
> dataset. After allocation I write my options into the temporary
> allocated Dataset. I have proved, that i have written the option into
> the dataset.
>
>
> Cobol-Upro: A5PO034
> .
> .
>
> MOVE 'A5PO257' TO DYNPROG Upro which allocate the dataset
> FB, Lrel=80
> and write the options
> into the temporary dataset.
> CALL DYNPROG USING UEBER-POSY
> MOVE 'DFSPARM' TO SORT-CONTROL
>
>
> IF RC-OK
> SORT SFILE ASCENDING SORT-FELDER
> INPUT PROCEDURE SORT-EIN
> OUTPUT PROCEDURE SORT-AUS
> END-IF
>
>
> But after the job is ended with no errors, I see the sort has ignored
>
> my options. (Filsz=269374,....
>
> If I looked in the JESYSMSG I see the system has allocated a dataset
>
> SMS ALLOCATED TO DDNAME (DFSPARM )
> DSN (SYS04119.T120029.RA000.VEA00XXX.CNTL1.H02 )
> STORCLAS (TEMP) MGMTCLAS ( ) DATACLAS (NULL)
> VOL SER NOS= P05373
> ....
> IKJ56228I DATA SET &&CNTL1 NOT IN CATALOG OR CATALOG CAN NOT BE
> ACCESSED
>
> Here I try to allocate the dataset with my assembler program
>
> IEF142I VEA00XXX STEP01 - STEP WAS EXECUTED - COND CODE 0000
> ...
> IGD105I SYS04119.T120030.RA000.VEA00XXX.CNTL1.H02 DELETED,
> DDNAME=CNTL1
> and DFSORT never see my dataset.
>
> What can I do, that DFsort works with my Options???
>
> What's wrong?
>
>
> Regards
>
> Jörg
I believe the problem is that the JCL already has the DFSPARM DDName
allocated at the time you tried to dynamically allocate DFSPARM.
That's why you get the dynamic allocation failure. When you
dynamically allocate DDName CNTL1, SORT doesn't care about that; it
reads the DFSPARM file allocated by the JCL. This is probably a null
file and SORT is using default parameters. (Can you verify that.) Why
don't you just IEBGENER the sort parms you want into a temp file in a
step prior to STEP01 and pass that file to the step STEP01. (Plus
remove your call to DYNPROG from ASPO034 - or just leave it in since
it uselessly creates DDName CNTL1 that nobody reads.)
| |
| P. Cress 2004-05-03, 3:32 pm |
| Joerg.Brehe@set-software.de (j?rg brehe) wrote in message news:<7f6b3f56.0404280257.160d5ead@posting.google.com>...
> Plattform OS/390
>
> I have a little problem. I allocate dynamically a dataset with
> DISP (New,delete,delete), DDName=CNTL1, DSNAME=&&CNTL1
> in an assembler program. IF I use DDNAME=DFSPARM I get an error.
> Dataset in use.
>
> In the JCL I have written
>
> //STEP01 EXEC PGM=A1PO001 our mainprogram
> //KARTE DD *
> .
> .
> //DFSPARM DD DSN=&&CNTL1,DISP=(NEW,PASS,DELETE)
>
> In our mainprogramm I call my
> Cobolprogram A5po257 which calls the assembler program to allocate the
> dataset. After allocation I write my options into the temporary
> allocated Dataset. I have proved, that i have written the option into
> the dataset.
>
>
> Cobol-Upro: A5PO034
> .
> .
>
> MOVE 'A5PO257' TO DYNPROG Upro which allocate the dataset
> FB, Lrel=80
> and write the options
> into the temporary dataset.
> CALL DYNPROG USING UEBER-POSY
> MOVE 'DFSPARM' TO SORT-CONTROL
>
>
> IF RC-OK
> SORT SFILE ASCENDING SORT-FELDER
> INPUT PROCEDURE SORT-EIN
> OUTPUT PROCEDURE SORT-AUS
> END-IF
>
>
> But after the job is ended with no errors, I see the sort has ignored
>
> my options. (Filsz=269374,....
>
> If I looked in the JESYSMSG I see the system has allocated a dataset
>
> SMS ALLOCATED TO DDNAME (DFSPARM )
> DSN (SYS04119.T120029.RA000.VEA00XXX.CNTL1.H02 )
> STORCLAS (TEMP) MGMTCLAS ( ) DATACLAS (NULL)
> VOL SER NOS= P05373
> ....
> IKJ56228I DATA SET &&CNTL1 NOT IN CATALOG OR CATALOG CAN NOT BE
> ACCESSED
>
> Here I try to allocate the dataset with my assembler program
>
> IEF142I VEA00XXX STEP01 - STEP WAS EXECUTED - COND CODE 0000
> ...
> IGD105I SYS04119.T120030.RA000.VEA00XXX.CNTL1.H02 DELETED,
> DDNAME=CNTL1
> and DFSORT never see my dataset.
>
> What can I do, that DFsort works with my Options???
>
> What's wrong?
>
>
> Regards
>
> Jörg
I believe the problem is that the JCL already has the DFSPARM DDName
allocated at the time you tried to dynamically allocate DFSPARM.
That's why you get the dynamic allocation failure. When you
dynamically allocate DDName CNTL1, SORT doesn't care about that; it
reads the DFSPARM file allocated by the JCL. This is probably a null
file and SORT is using default parameters. (Can you verify that.) Why
don't you just IEBGENER the sort parms you want into a temp file in a
step prior to STEP01 and pass that file to the step STEP01. (Plus
remove your call to DYNPROG from ASPO034 - or just leave it in since
it uselessly creates DDName CNTL1 that nobody reads.)
| |
| j?rg brehe 2004-05-27, 6:31 am |
| Colin Campbell <cmcampb@adelphia.net_remove_this> wrote in message news:<6Vdkc.11$J86.3@dfw-service2.ext.ray.com>...
> Joerg,
> You could always write the "facts" that you want Sort to know into both
> data sets. Then, whichever Sort program is in use will read its
> preferred input options file.
>
Yes, thats rigth. However I must pass a DDNAME to
Sort-control like DFSPARM or $ORTPARM.
And DFSORT can change the Name DFSPARM to $ORTPARM by init.
with PARMDDM=$ORTPARM or as like.
|
|
|
|
|