|
View previous topic :: View next topic
|
| Author |
Message |
kranthikumarb
Active User
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
|
|
|
|
Hi,
I am trying to use the following JCL and procedure to run a simple program which writes into two files. It is throwing me the following error
| Code: |
IEF825I INVALID CHARACTER IN THE LIKE FIELD
|
Can't we use gdgs in like parameters? Incase if I wish to point to the latest version of the previous file, how do i do that. Kindly help.
------
JCL
------
| Code: |
//G70377J JOB ,,NOTIFY=&SYSUID,CLASS=B,MSGLEVEL=(1,1),MSGCLASS=X
//JCLLIB JCLLIB ORDER=(G70377.KRANTHI.PROC)
//SETVAR SET REGION=CICS1,QUAL1=OUT1,QUAL2=OUT2,ID=G70377
//STEP1 EXEC PROC=PROC2
|
-------
PROC
-------
| Code: |
//G70377K PROC LOAD1=OPERN.®ION..LOADLIB,
// GENOUT=(+1),
// GENOUT=(0)
//STEP1 EXEC PGM=DEMO2
//STEPLIB DD DSN=&LOAD1,DISP=SHR
//INP DD DSN=&ID..SORT.INPUT.FILE,DISP=SHR
//OUT1 DD DSN=&ID..&QUAL1..FILE&GENOUT,DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,2)),
// LRECL=80,RECFM=FB
//OUT2 DD DSN=&ID..&QUAL2..FILE&GENOUT,DISP=(NEW,CATLG,DELETE),
// LIKE=&ID..&QUAL1..FILE&GENIN
//
|
Thanks |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Are these files sms managed? I believe this option only works with sms managed data.
| Quote: |
Keyword, optional -- use this parameter only with SMS
Without SMS, use the DCB=dsname form of the DCB parameter described in topic 12.16.2. |
In the PROC the GENOUT= has been defined 2 times. GENIN is in the proc, but not referenced.
Suggest you review the process and build it up one bit at a time.
Also suggest you become familiar with the link to "IBM Manuals" at the top of the page. |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I think the problem is you cannot use LIKE using the ralative GDG, if you specify the fully qualified name you will overcome the syntax error.
Gerry |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
| Or maybe it is because there is no value for GENIN being set but &GENIN is used in your PROC. |
|
| Back to top |
|
 |
kranthikumarb
Active User
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
|
|
|
|
| That was just a copy paste error. I took the wrong version of the JCL Please ignore GENOUT/GENIN problem. I still have the same error even after changing it to GENIN. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
| Quote: |
| Are these files sms managed? |
Have you verified if they are sms managed or not?
| Quote: |
Suggest you review the process and build it up one bit at a time.
|
Have you started a "new" set of jcl and gradually "grown" it?
Suggest you also post the actual jcl not some heavily edited "show" version. |
|
| Back to top |
|
 |
kranthikumarb
Active User
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
|
|
|
|
Hi Dick sherrer,
As suggested , I started from the begnining of the JCL i.e. step by step and i found that it is working fine if i use the latest version of the gdg manually.
But if i replace G0002V00 with (0). It is throwing me error. Is there any way to point to the latest version of the GDG?
| Code: |
//STEP1 EXEC PGM=DEMO2
//STEPLIB DD DSN=OPERN.CICS1.LOADLIB,DISP=SHR
//INP DD DSN=&ID..SORT.INPUT.FILE,DISP=SHR
//OUT1 DD DSN=&ID..&QUAL1..FILE(+1),DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,2)),
// LRECL=80,RECFM=FB
//OUT2 DD DSN=&ID..&QUAL2..FILE(+1),DISP=(NEW,CATLG,DELETE),
// LIKE=&ID..&QUAL1..FILE.G0002V00
//
|
|
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
| Quote: |
| Is there any way to point to the latest version of the GDG? |
I suspect the +1 is not "the latest" while in the creating step . . . It has not been "finalized" and does not yet "exist" - it is still being created.
From the JCL manual (i added the bolding):
| Quote: |
| Use the LIKE parameter to specify the allocation attributes of a new data set by copying the attributes of a model data set, which must be an existing cataloged data set and reside on a direct access volume. |
You might try with (0) instead of +1 . . . |
|
| Back to top |
|
 |
kranthikumarb
Active User
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
|
|
|
|
Well, I tried using (0) only.
I tried using (+1) for creating a new generation dataset and for referring to the latest version of previous file, i used (0) in LIKE parameter. I dont see any problem with this. Correct me if i am wrong.
Also, we are using JES3. That means all the datasets are allocated before the job is scheduled. So a new version of the dataset OUT1 must be created already before the job is scheduled. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
| Quote: |
| So a new version of the dataset OUT1 must be created already before the job is scheduled. |
Allocating a dataset is not the same as "an existing cataloged data set ". Merely being allocated is not completely created.
It sounds like you are able to move forward with the testing  |
|
| Back to top |
|
 |
kranthikumarb
Active User
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
|
|
|
|
Yes, I used sequential files instead of GDGs.  |
|
| Back to top |
|
 |
vvrahul
New User
Joined: 18 Oct 2005 Posts: 3 Location: Mumbai, India
|
|
|
|
Hi,
I would like to add to Dick. When new GDG version are being allocated, the catalog happens only when the job finishes.
//STEP01 EXEC PGM=IEFBR14
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=&ID.FILE.GDG(+1),
// DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB),
// SPACE=(TRK,(1,5),RLSE),
// UNIT=SYSDA
//DD02 DD DSN=&ID.FILE.GDG(+1),
// DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB),
// SPACE=(TRK,(1,5),RLSE),
// UNIT=SYSDA
Would allocate and catalog only one verion of the GDG.
If we do need two version one should use:
//STEP01 EXEC PGM=IEFBR14
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=&ID.FILE.GDG(+1),
// DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB),
// SPACE=(TRK,(1,5),RLSE),
// UNIT=SYSDA
//DD02 DD DSN=&ID.FILE.GDG(+2),
// DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB),
// SPACE=(TRK,(1,5),RLSE),
// UNIT=SYSDA
Similarly I used the Like function and it worked fine for me:
//STEP01 EXEC PGM=IEFBR14
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=&ID.FILE.GDG(+1),
// DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB),
// SPACE=(TRK,(1,5),RLSE),
// UNIT=SYSDA
//DD02 DD DSN=&ID.FILE.GDG(+2),
// DISP=(NEW,CATLG,DELETE),
// LIKE=&ID.FILE.GDG.G0001V00
Thanks,
Rahul. |
|
| Back to top |
|
 |
Peter Poole
New User

Joined: 07 Jan 2009 Posts: 50 Location: Scotland
|
|
|
|
Correct. (+n) relative GDGs are used to work out what the explicit G**V* suffix will be, based on a look at the catalog when the job starts. (Though in the example above the OP is creating +1 of two different datasets)
If you can't get like to work with relative GDG and don't want the hassle of working out what the explicit DSN is, you could always dodge the bullet by setting up a spurious non-GDG file as ID..&QUAL1..MODEL and using that in the LIKE statement.
Cheers. |
|
| Back to top |
|
 |
ykishor Currently Banned New User

Joined: 11 Aug 2007 Posts: 24 Location: my pc
|
|
|
|
| Quote: |
When new GDG version are being allocated, the catalog happens only when the job finishes.
|
I guess this happens after the step in which the GDG is created. But accessing the new GDG created in the same job depends on sys parms... some places u can access only after the job has completed...others it could after the STEP has completed..... |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|