mainframe

How do you edit a Binary Mainframe file in the RecordEditor using a Cobol Copybook (pt1)

落爺英雄遲暮 提交于 2019-11-29 12:22:12
How do you edit a Single-Record-type Binary Mainframe file in the RecordEditor using Cobol Copybook on a Windows or Linux PC. Note: This is an attempt to split a very broad question into a series of simpler Question and Answers. To Edit a File in the RecordEditor with a Cobol Copybook you must first load the copybook and then edit the file Loading the Cobol Copybook into the RecordEditor Select Record Layouts >>> Load Cobol Copybook menu options On the Cobol Load Screen enter the Cobol Copybook and your Mainframe Data file . The RecordEditor will read the file and try and work out what the

How to run dymanic SQL through IKJEFT01 Utility?

和自甴很熟 提交于 2019-11-29 08:45:01
How can we pass parameters in SQL query while executing IKJEFT01? Example: //UNLOAD EXEC PGM=IKJEFT01 //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * DSN SYSTEM(DB2X) RETRY(120) RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) - PARM('SQL') END //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=D //SYSREC00 DD DSN=FCSTN.AK.XXXXXX, // DISP=(NEW,CATLG,DELETE), //SYSPUNCH DD SYSOUT=* //SYSIN DD * SELECT * FROM ABC.DEF WHERE XYZ='999' /* Instead of giving value in sql query as '999' i want to pass the value through a variable. How this can be done? Plz help...! Have a separate step, prior to your UNLOAD step, that writes the

Executing a DFSORT using REXX

两盒软妹~` 提交于 2019-11-28 12:21:07
问题 I would like to know,is it possible to invoke DFSORT through REXX? I have used the below code,but the result is not as expected. /*REXX*/ QUEUE "//ISDNNNN JOB XXX,XX" QUEUE"//STEP003 EXEC PGM=SORT" "FREE FI(SYSOUT SORTIN SORTOUT)" "ALLOC FI(SYSOUT) DA(*)" "ALLOC FI(SORTIN) DA('XXX.XXX.XXX') REUSE' "ALLOC FI(SORTOUT) DA('XXX.XXX.XXX.OUT') REUSE' QUEUE"//SYSIN DD*" " SORT FIELDS = COPY" " INCLUDE COND = (1,2,CH,EQ,C'AR')" QUEUE"/*" QUEUE"//SYSPRINT DD SYSOUT=*" QUEUE"$$" "SUBMIT * END($$)" 回答1:

Convert Mainframe Binary to Ascii Using any Open Source Code or Tool

一世执手 提交于 2019-11-28 10:27:14
How can I convert a mainframe binary file (EBCDIC) having cobol copybook as record layout information to ASCII file by keeping in mind regarding the packed and zoned decimal format using any Java API or Open source tool? Reading in Java If you want to Read Mainframe Cobol Files in java, have a look at JRecord - You will have to specify the charset (font). For US EBCDIC use CP037. Legstar - Have variety of Mainframe - Cobol Tools CB2java - Has not been updated in a while (not supported any more and has problems) Also the RecordEditor will let you view / Edit Mainframe Cobol Files Conversion

Compare two files and write it to “match” and “nomatch” files

て烟熏妆下的殇ゞ 提交于 2019-11-28 04:15:43
问题 I have two input files, each with length of 5200 bytes. A seven byte key is used to compare both files, if there is a match then it needs to be written to "match" file but while writing to match file I need a few fields from infile1 and all other fields from infile2 . If there is no match then write to no match file. Is it possible to do it in sort ? I know it can be easily done using COBOL program but just want to know in SORT/ICETOOL/Easytrieve Plus (EZTPA00) . 回答1: Since 12,200 people have

JCL - Get count of non space chars in a given area (mainframe)

橙三吉。 提交于 2019-11-28 01:44:37
I need to prepare some input data to run through a program, the data should be in the following format. UID (1-11)|TxtLen (12-16)| Text (17-62) I can use sort to position the fields properly and get the UID and text fields. The ‘TxtLen’ is should contain the number of chars from the start of the text field to the last char in the text field. i.e. “Hello”’s TxtLen is 5, “Hel lo”’s TxtLen is 6, “Hello World”’s TxtLen is 11, etc... I want to know if there is a way of getting the TxtLen through JCL only, or is a program required to do this? -Thanks You will need a program. I see a fair number of

How to pull data from Mainframe to Hadoop

做~自己de王妃 提交于 2019-11-28 01:17:04
I have files in Mainframe. I want these data to be pushed to Hadoop(HDFS)/HIVE. I can use Sqoop for the Mainframe DB2 database and import it to HIVE, but what about files (like COBOL , VASM etc.) Is there any custom flume source that I can write or some alternative tool to use here? COBOL is a programming language, not a file format. If what you need is to export files produced by COBOL programs, you can use the same technique as if those files were produced by C, C++, Java, Perl, PL/I, Rexx, etc. In general, you will have three different data sources: flat files, VSAM files, and a DBMS such

Dynamically Reading COBOL Redefines with C#

醉酒当歌 提交于 2019-11-27 09:30:47
I'm making a C# program that will be able to dynamically read an IBM HOST Copybook written in COBOL and generate an SQL table off of it. Once the table is generated I can upload a file into my program and it will read, convert from IMB-37 and insert the file into that sql table. So far I can handle almost anything, although I'm running into some issues with REDEFINES. For example: 10 SOME-FIELD PIC 9(3) COMP-3. SCRRB205 4117 10 SOME-OTHER-FIELD REDEFINES 3041-17 4117 SOME-FIELD PIC X(2). 3041-17 I understand that the redefine takes the place of the field above it in this case, although what i

JCL - Get count of non space chars in a given area (mainframe)

别等时光非礼了梦想. 提交于 2019-11-26 23:33:57
问题 I need to prepare some input data to run through a program, the data should be in the following format. UID (1-11)|TxtLen (12-16)| Text (17-62) I can use sort to position the fields properly and get the UID and text fields. The ‘TxtLen’ is should contain the number of chars from the start of the text field to the last char in the text field. i.e. “Hello”’s TxtLen is 5, “Hel lo”’s TxtLen is 6, “Hello World”’s TxtLen is 11, etc... I want to know if there is a way of getting the TxtLen through

How to pull data from Mainframe to Hadoop

醉酒当歌 提交于 2019-11-26 23:30:48
问题 I have files in Mainframe. I want these data to be pushed to Hadoop(HDFS)/HIVE. I can use Sqoop for the Mainframe DB2 database and import it to HIVE, but what about files (like COBOL , VASM etc.) Is there any custom flume source that I can write or some alternative tool to use here? 回答1: COBOL is a programming language, not a file format. If what you need is to export files produced by COBOL programs, you can use the same technique as if those files were produced by C, C++, Java, Perl, PL/I,