Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > DFsort + dynamic allocation
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 31st March 02:01
joerg.brehe
External User
 
Posts: 1
Default DFsort + dynamic allocation



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.

//STEP01 EXEC PGM=A1PO001 our mainprogram
//KARTE DD *
  Reply With Quote


  sponsored links


2 9th April 06:24
pcress
External User
 
Posts: 1
Default DFsort + dynamic allocation



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.)
  Reply With Quote
3 9th April 06:24
joerg.brehe
External User
 
Posts: 1
Default DFsort + dynamic allocation


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
  Reply With Quote
4 9th April 06:24
colin campbell
External User
 
Posts: 1
Default DFsort + dynamic allocation


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.)
  Reply With Quote
5 16th April 05:45
joerg.brehe
External User
 
Posts: 1
Default DFsort + dynamic allocation


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.
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666