IEBGENER utility

3
The IEBGENER utility FREQUENTLY ASKED QUESTIONS 1. What is the default length of a dataset created using IEBGENER ? 2000 characters 2. How IEBGENER can be used for creating new datasets with specific formats from already existing datasets ? Use the following JCL to edit a dataset and create a new format JCL: //ABCDEFGH JOB (xxxxxxx,020),'TEST JCL',CLASS=X,MSGCLASS=X, // REGION=0M,NOTIFY=xxxxxxxxx //JSTEP010 EXEC PGM=IEBGENER //SYSUT1 DD DSN=Input data set name, DISP=SHR //SYSUT2 DD DSN=Output Data set name,DISP=SHR //SYSIN DD * GENERATE MAXFLDS=3,MAXLITS=8 RECORD FIELD=(9,1,,1), FIELD=(8,' ',,10),FIELD=(483,17,,18) //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* Here the first field statement will take first 9 characters from input dataset and will be the first 9 characters in the output dataset. Next field statement will put 8 blank positions in the output dataset from 10 th position. Third field will copy 483 characters from input dataset position 17 to output dataset position 18. 3. How can we convert Data mode of a dataset ? Use the following JCL for conversion of data modes : //ABCDEFGH JOB (xxxxxxxx,020),'TEST JCL',CLASS=X,MSGCLASS=X, // REGION=0M,NOTIFY=xxxxx //JSTEP010 EXEC PGM=IEBGENER //SYSUT1 DD DSN=Input dataset, DISP=SHR //SYSUT2 DD DSN=Output dataset,DISP=SHR //SYSIN DD * GENERATE MAXFLDS=1 RECORD FIELD=(9,1,PZ,1) //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //*

Transcript of IEBGENER utility

Page 1: IEBGENER utility

The IEBGENER utilityFREQUENTLY ASKED QUESTIONS

1. What is the default length of a dataset created using IEBGENER ?2000 characters

2. How IEBGENER can be used for creating new datasets with specific formatsfrom already existing datasets ?Use the following JCL to edit a dataset and create a new format JCL://ABCDEFGH JOB (xxxxxxx,020),'TEST JCL',CLASS=X,MSGCLASS=X,// REGION=0M,NOTIFY=xxxxxxxxx//JSTEP010 EXEC PGM=IEBGENER//SYSUT1 DD DSN=Input data set name, DISP=SHR//SYSUT2 DD DSN=Output Data set name,DISP=SHR//SYSIN DD *GENERATE MAXFLDS=3,MAXLITS=8RECORD FIELD=(9,1,,1),FIELD=(8,' ',,10),FIELD=(483,17,,18)//SYSPRINT DD SYSOUT=*//SYSUDUMP DD SYSOUT=*Here the first field statement will take first 9 characters from input dataset and will be thefirst 9 characters in the output dataset. Next field statement will put 8 blank positions in theoutput dataset from 10 th position. Third field will copy 483 characters from input datasetposition 17 to output dataset position 18.

3. How can we convert Data mode of a dataset ?Use the following JCL for conversion of data modes ://ABCDEFGH JOB (xxxxxxxx,020),'TEST JCL',CLASS=X,MSGCLASS=X,// REGION=0M,NOTIFY=xxxxx//JSTEP010 EXEC PGM=IEBGENER//SYSUT1 DD DSN=Input dataset, DISP=SHR//SYSUT2 DD DSN=Output dataset,DISP=SHR//SYSIN DD *GENERATE MAXFLDS=1RECORD FIELD=(9,1,PZ,1)//SYSPRINT DD SYSOUT=*//SYSUDUMP DD SYSOUT=*//*Here output dataset is created with first 9 characters of Input dataset with Packed DecimalData. Other options that can be used are:PZ : Packed Decimal to Unpacked DecimalHE : Convert H-set BCD data to EBCDICBlank : Data is moved without conversion

4. How to create a PDS from a PS ?.Use the following JCL ://ABCDEFG JOB (SYST-VFSSYSP,020),'TEST JCL',CLASS=X,MSGCLASS=X,// REGION=0M,NOTIFY=xxxxx//JSTEP010 EXEC PGM=IEBGENER//SYSUT1 DD DSN=Input Dataset name,DISP=SHR//SYSUT2 DD DSN=PDS name,DISP=(NEW,CATLG,CATLG),// SPACE=(CYL,(1,1,10)),// DCB=(RECFM=FB,LRECL=500,BLKSIZE=27500)

Page 2: IEBGENER utility

//SYSIN DD *GENERATE MAXNAME=2,MAXGPS=2MEMBER NAME=TEST1RECORD IDENT=(8,'C4700033',1)MEMBER NAME=TEST2RECORD IDENT=(4,'1515',38)//SYSPRINT DD SYSOUT=*//*The PDS created will contain two members TEST1 and TEST2.The last record in theTEST1 will be decided using the RECORD IDENT statement which checks for literal‘C4700033’ from first character in the input dataset and TEST2 contains all records afterTEST1 records and the last record has literal ‘1515’ from its 38 th position. While using thisJCL make sure that all the DCB parameters matches with the Input dataset name.

5. How to Expand an existing PDS from input sequential dataset?Use the following JCL to expand the PDS ://ABCDEFGH JOB (SYST-VFSSYSP,020),'TEST JCL',CLASS=X,MSGCLASS=X,// REGION=0M,NOTIFY=xxxxx//JSTEP010 EXEC PGM=IEBGENER//SYSUT1 DD DSN=Input Dataset name,DISP=SHR//SYSUT2 DD DSN=PDS Name,DISP=(OLD,CATLG,CATLG)//SYSIN DD *GENERATE MAXNAME=1,MAXGPS=1MEMBER NAME=TEST3RECORD IDENT=(8,'C4700033',1)//SYSPRINT DD SYSOUT=*//*The third member TEST3 is created using records that are having literal ‘C4700033’ in theirfirst 8 bit positions.

6. What is a Double Byte Character Data Set (DBCS) ? How it can be edited usingIEBGENER?A character set in which each character is represented by a 2-byte code. Languages suchas Japanese, Chinese, and Korean, which contain more symbols that can be representedby 256 code points, require double-byte character sets. Because each character requires 2bytes, entering, displaying, and printing DBCS characters requires hardware and supportingsoftware that are DBCS capable. Contrast with single-byte character set (SBCS). Asequence of double-byte characters must be delimited by the shift-out character (X'0E') atthe left end and by the shift-in character (X'0F') at the right end.

These DBCS character sets can be edited using IEBGENER in the similar way as that ofSBCS character sets. Only difference is that add a DBCS=YES indicator with the Generatestatement.

7. How IEBGENER is used to send mails?IEBGENER creates a dataset of mail text, which will be delivered by the SMTP task to theTCP/IP destination. Specifying the spool and SMTP in the SYSUT2 control statementcreates this dataset.

8. I can’t get the IEBGENER SMTP Job to send mail. Can you help me?You should ensure that the SMTP task is correctly configured and operational at your site. IfIBM’s SMTPNOTE command doesn’t send mail, the IEBGENER examples won’t workeither.