Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Tue Jan 17, 2006 1:21 pm Post subject:
If you want an assembler solution, issue an SVC 26 (LOCATE) on the dsn(0) name and it will return the real dsname. Its only a few lines of assembler. See the REALNAME rexx function written in assembler for an example.
So a call to IDCAM will produce the same results as this?
kolusu wrote:
Maneesh chawla,
The following DFSORT jcl will give you the desired results.Cogito has the right idea but he is making 3 passes to get the data.You can avoid all that and do it in just 1 pass.
I used IDCAMS to produce the latest GDG, but there was other information in the file created, so I tried to SORT the output from the SYSPRINT; but I got a RC=16 (RDW NOT INCLUDED). When I searched the site I noticed that you need 4 bytes for the VB files, but when I added I still got the RC=16. What is the issue with this syntax?
COMMAND ===> SCROLL ===> SCREEN
*************************** Top of Data ******************************
SYNCSORT FOR Z/OS 1.1DR TPF3A U.S. PATENTS: 4210961, 5117495 (C) 2002 SYNC
z/OS 1.5.0
PRODUCT LICENSED FOR CPU SERIAL NUMBER 20F9E, MODEL 2084 304 LICEN
SYSIN :
SORT FIELDS=COPY,SKIPREC=5,STOPAFT=1
OUTFIL OUTREC=(22,44)
WER164B 7,920K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 2,028K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=VBA ; LRECL= 125; BLKSIZE= 27998
WER235A SORTOUT OUTREC RDW NOT INCLUDED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
************************** Bottom of Data ***************************
I noticed that you used IKJEFT01, and the LISTCAT worked. I also tried IDCAMS with the changes listed, but with both IKJEFT01 and DICAMS there was a RC=16 on the SORT(potential insufficient use of INREC).
The problem seems to be associated with the DCB of your output dataset. Check the Definition of your sysout, your sort program is trying to write a dataset with 80 as the LRECL, you may either force the real lrecl in your sort step or better yet create a whole new dataset, letting the sort program to do so in your behalf. This are the quick an easy ways, however, several other options are also possible. Also take into consideration that in the way you are creating your sortout dataset it has to be VBA. You do not seem to be doing anything which justifies the OUTFIL statement, It may be worth to think whether or not just an OUTREC statement will suffice in your case. _________________ Best wishes,
The problem was with the file being allocated; for some reason a VB file is being created. I just made sure that the parameters matched and it worked. Thanks,
My search brought me back here. "Passing current GDG level to COBOL"
Can I dynamically change the contents of this IDCOMND ddname to the LISTCAT generated in in the program?
The current GDG captured is always the one form the file asociated with the IDCOMND ddname.
I have been able to use the listcat and sort in JCL to get the current GDG, and I can use these results as input into a program.
I have been able to point to the JFCB in asembler (not RDJFC wich may or may not contain the current DSN/GDG level), and
I have been able to call IDCAMS and issue other TSO commands from within Cobol.
However, all of these techniques seem to be limited by the fact that the GDG base has to be know and passed to the program.
The problem with this is that the GDG is created from parameters in a PROC and the base is not captured in any of the steps.
What I need is to trap the current GDG level from within COBOL after the PROC step has dynamically created the GDG.
I am able to generate the LISTCAT for the GDG base created dynamically from the PROC, but the current GDG level written out is always the one listed in the file associated with the IDCOMND DD. If I can changed the contents of this file, so that it contains the new LISTCAT generated from within the program that will resolve this issue.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum