mainframe

How to read two records and compare them with a primary key in sequential file system?

家住魔仙堡 提交于 2019-12-25 04:48:34
问题 This is the record format for my input file: ID NAME Purchaseamount month 1 xxx 10000 feb 1 xxx 10000 mar 1 xxx 10000 apr 2 yyy 100 jan 2 yyy 2054 mar How can I add the purchase amount for every person? I will give you the pseudo-code of my work. Read inputfile, move to working storage variables, end read, perform until eof, read input file, if inputid = ws-input id, add purchase amount, else write to output file 回答1: Bruce provides a good solution, but there is often more than one way to do

EBCDIC to ASCII Conversions

前提是你 提交于 2019-12-25 01:13:33
问题 I have mainframe file in EBCDIC format and I want to convert those files into ASCII format. I have tried converting EBCDIC to ASCII using python 2.6 but there are many issues in that like compression field didn't get converted and records count gets increased. Is there any way to convert EBCDIC files having compressed fields to ASCII format. 回答1: Options Some options Convert the file to a Text file on the mainframe (sort or eastrieve will both do this) If it is a once off the Fileaid/File

Does the whole linkage section return?

二次信任 提交于 2019-12-24 17:43:23
问题 In program a EXEC CICS LINK PROGRAM(PGMB) COMMAREA(COMMA) LENGTH(LENGTH OF COMMA) RESP(CICS-RESP) END-EXEC In program b EXEC CICS RETURN END-EXEC Does program b only return the commarea that program a passed? Or does it return the whole LINKAGE SECTION? 回答1: Program B returns neither the entire LINKAGE SECTION nor the commarea (COMMA in your example). It returns nothing. Why does it return nothing? Because nothing gets passed to it. Or, rather, what gets passed to it is simply the address(es)

FINDREP a short string with longer without overwriting next column

本小妞迷上赌 提交于 2019-12-24 17:39:11
问题 So I have a set of data such as this: mxyzd1 0000015000 mxyzd2 0000016000 xyzmd5823 0000017000 I need to use dfsort to get this data: 123xyzd1 0000015000 123xyzd2 0000016000 xyz123d5820000017000 So what I mean is: replace all character 'm' by '123' without overwriting the second column, so truncate data before you get to the second column (which starts at pos 11). So far I've been able to replace the data but can't prevent all of my data of getting shifted, this is my code so far: SYSIN DATA

Upload Files to Mainframes from VB.net

蹲街弑〆低调 提交于 2019-12-24 11:23:01
问题 I am trying to upload a file from my pc to mainframes. I am trying to upload it using Chilkat FTP2. Below is the code. The file I am trying to upload is 2009102600000 Dim ftp As New Chilkat.Ftp2() Dim success As Boolean ' Any string unlocks the component for the 1st 30-days.' success = ftp.UnlockComponent("Anything for 30-day trial") If (success <> true) Then MsgBox(ftp.LastErrorText) Exit Sub End If ftp.Hostname = "www.myside.com" ftp.Username = "****" ftp.Password = "****" ' The default

How to get the Matching and Non-matching records from two input files in one step using SYNCSORT?

你说的曾经没有我的故事 提交于 2019-12-24 10:35:29
问题 I have a requirement like below. -> I have 2 input files FILE1 and FILE2. -> Write the matching records into a FILE3. -> Write the Non matching records from FILE1 into FILE4. -> Write the Non matching records from FILE2 into FILE5. The key position in both the Input Files is (1,10). Can anybody please let me know the SORTCARD, how Can I get this in single step in SyncSort?? Thanks in Advance, Rajasekhar Jannu. 回答1: JOINKEYS FILE=F1,FIELDS=(01,10,A) JOINKEYS FILE=F2,FIELDS=(01,10,A) UNPAIRED

How can z/OS call a web service? [closed]

末鹿安然 提交于 2019-12-24 02:02:37
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 9 months ago . I have a COBOL program that needs to get data from a web service. Without using CICS what are my best options? I thought that a C program could read the web service and save it to a file, then the COBOL could read that file. Can COBOL call a web service? The data is about 300mb

Connect Direct : File sending from Mainframe to Unix

試著忘記壹切 提交于 2019-12-20 05:45:10
问题 When I am sending a Variable length file from Mainframe Connect direct to UNIX box, the file on UNIX have some extra bytes on the beginning of the Mainframe file, I tried using different SYSOPTS option but I am still getting those intial bytes. Any Idea ? 回答1: You should look at getting the file copied to a Fixed-Length record (recfm=FB) file on the mainframe before doing the transfer. There are a number of mainframe utilities that can do this (i.e. sort). If you transfer it as a VB file you

Screen scraping a mainframe screen in C# *without* 3rd-party utilities

我怕爱的太早我们不能终老 提交于 2019-12-20 02:35:25
问题 I'm looking to screen scrape a 3270 mainframe application in C#, but I've got to do so without Attachmate or other 3rd party plugins. Are there free managed libraries to do so in C#? 回答1: http://www.elink.ibmlink.ibm.com/publications/servlet/pbi.wss?CTY=US&FNC=SRX&PBL=GA23-0059-07 This is the document you are looking for if you plan on doing all of the heavy lifting yourself. It doesn't print out well but is the best source of information on the protocol. I am about to embark on this road

Downloading text files with Python and ftplib.FTP from z/os

荒凉一梦 提交于 2019-12-19 03:13:09
问题 I'm trying to automate downloading of some text files from a z/os PDS, using Python and ftplib. Since the host files are EBCDIC, I can't simply use FTP.retrbinary(). FTP.retrlines(), when used with open(file,w).writelines as its callback, doesn't, of course, provide EOLs. So, for starters, I've come up with this piece of code which "looks OK to me", but as I'm a relative Python noob, can anyone suggest a better approach? Obviously, to keep this question simple, this isn't the final, bells-and