how to deal with the below scenario using iebgener
Moderators: Frank Yaeger, DikDude, Moderator Group
-
- Member
- Posts: 5
- Joined: Fri Dec 02, 2011 10:17 pm
how to deal with the below scenario using iebgener
this is my jcl. i want to insert first record and second record of sysut1 into sysut2 of om2...when i submit job ,om2 created EMPTY( records are not iserted into om2) and giving maxx=12...
//XXXXX4A JOB (ACCTINFO),'COMMENT',NOTIFY=&SYSUID,
// CLASS=C,MSGCLASS=H,MSGLEVEL=(1,1)
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
hai mainframes
welcome
/*
//SYSUT2 DD DSN=MATRB743.COBOL.OM2,DISP=(NEW,CATLG,CATLG)
// SPACE=(TRK,(5,5,1),RLSE),UNIT=SYSDA,
// DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)
//SYSIN DD DUMMY
----------------------------------------
OUTPUT:
Command ===> _______________________________________________ Scroll ==> CSR_
********************************* Top of Data *********************************
STMT NO. MESSAGE
JCL SYNTAX CHECK COMPLETED WITH 0 ERROR(S) AND 0 WARNING(S)
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF237I JES2 ALLOCATED TO SYSUT1
IGD101I SMS ALLOCATED TO DDNAME (SYSUT2 )
DSN (MATRB743.COBOL.OM2 )
STORCLAS (STORCL01) MGMTCLAS (MGMTCL01) DATACLAS (DATACL01)
VOL SER NOS= 339XXX
IEF237I JES2 ALLOCATED TO SYSIN
IEF142I MATRB74 STEP1 - STEP WAS EXECUTED - COND CODE 0012
IGD102I MATRB743.COBOL.OM2 CATALOGED, DDNAME=SYSUT2
IEF373I STEP/STEP1 /START 2011340.0944
IEF374I STEP/STEP1 /STOP 2011340.0944 CPU 0MIN 0.00SEC SRB 0MIN 0.00S
IEF375I JOB/MATRB74 /START 2011340.0944
IEF376I JOB/MATRB74 /STOP 2011340.0944 CPU 0MIN 0.00SEC SRB 0MIN 0.00S
***************************** Bottom of Data
**********************************
WAITING FOR THE MEMBERS VALUABLE ADVICES
//XXXXX4A JOB (ACCTINFO),'COMMENT',NOTIFY=&SYSUID,
// CLASS=C,MSGCLASS=H,MSGLEVEL=(1,1)
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
hai mainframes
welcome
/*
//SYSUT2 DD DSN=MATRB743.COBOL.OM2,DISP=(NEW,CATLG,CATLG)
// SPACE=(TRK,(5,5,1),RLSE),UNIT=SYSDA,
// DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)
//SYSIN DD DUMMY
----------------------------------------
OUTPUT:
Command ===> _______________________________________________ Scroll ==> CSR_
********************************* Top of Data *********************************
STMT NO. MESSAGE
JCL SYNTAX CHECK COMPLETED WITH 0 ERROR(S) AND 0 WARNING(S)
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF237I JES2 ALLOCATED TO SYSUT1
IGD101I SMS ALLOCATED TO DDNAME (SYSUT2 )
DSN (MATRB743.COBOL.OM2 )
STORCLAS (STORCL01) MGMTCLAS (MGMTCL01) DATACLAS (DATACL01)
VOL SER NOS= 339XXX
IEF237I JES2 ALLOCATED TO SYSIN
IEF142I MATRB74 STEP1 - STEP WAS EXECUTED - COND CODE 0012
IGD102I MATRB743.COBOL.OM2 CATALOGED, DDNAME=SYSUT2
IEF373I STEP/STEP1 /START 2011340.0944
IEF374I STEP/STEP1 /STOP 2011340.0944 CPU 0MIN 0.00SEC SRB 0MIN 0.00S
IEF375I JOB/MATRB74 /START 2011340.0944
IEF376I JOB/MATRB74 /STOP 2011340.0944 CPU 0MIN 0.00SEC SRB 0MIN 0.00S
***************************** Bottom of Data
**********************************
WAITING FOR THE MEMBERS VALUABLE ADVICES
-
- Member
- Posts: 5
- Joined: Fri Dec 02, 2011 10:17 pm
Try:
Code: Select all
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
hai mainframes
welcome
/*
//SYSUT2 DD DSN=MATRB743.COBOL.OM2,DISP=(,CATLG,DELETE),
// SPACE=(TRK,(5,5),RLSE),UNIT=SYSDA
//SYSIN DD DUMMY
-
- Member
- Posts: 5
- Joined: Fri Dec 02, 2011 10:17 pm
-
- Member
- Posts: 5
- Joined: Fri Dec 02, 2011 10:17 pm
mainframes_6002, the code I posted works for me on my local system, and realistically, is generic enough to work pretty much anywhere.
I get this content in my dataset:
SYSPRINT output:
I get this content in my dataset:
Code: Select all
hai mainframes
welcome
Code: Select all
DATA SET UTILITY - GENERATE
IEB352I WARNING: ONE OR MORE OF THE OUTPUT DCB PARMS COPIED FROM INPUT
PROCESSING ENDED AT EOD
What were you told elsewhere that you have never done. . .
That would be to catalog the pds BEFORE trying to copy data into a member. This would be a 2-step job or a manual creation of the pds and a 1-step job to copy in the data to a member.
Do what has been suggested and post all of the output and we can see which direction(s) you have not followed.
The reason this drags on is because you do not appear to understand what people have explained. Unfortunately, there are many ways to do many things in our environment and until you learn some basics, you need to very carefully try what you have been suggested.
What you show you want is to create a member in a pds (unless i misunderstand), but your posted jcl has never been close. So, do this in 2 steps and get the data into the member. We can continue looking at alternative ways to do this if there you are still interested.
That would be to catalog the pds BEFORE trying to copy data into a member. This would be a 2-step job or a manual creation of the pds and a 1-step job to copy in the data to a member.
Do what has been suggested and post all of the output and we can see which direction(s) you have not followed.
The reason this drags on is because you do not appear to understand what people have explained. Unfortunately, there are many ways to do many things in our environment and until you learn some basics, you need to very carefully try what you have been suggested.
What you show you want is to create a member in a pds (unless i misunderstand), but your posted jcl has never been close. So, do this in 2 steps and get the data into the member. We can continue looking at alternative ways to do this if there you are still interested.
Have a good one
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page