WER202A Sortout RECFM Incompatible - mainframe

I have a requirement to create an output file in VB format. My Input file has 1004 record length with VB format and file 2 has fixed 410 byte length. I need to match the both files based on the key and add the 4 bytes from 2nd file (407,04).
I have used the below sortjoin
Sort fields=copy
Joinkeys files=f1, Fields=(19,9,A) -- File1 key position at 15 but used 19 as VB file
Joinkeys files-f2,Fields=(14,9,a) - VB file
Join unpaired, f1,
Reformat fields=(F1:1004,F2:407,4)
While trying to run the job, getting the error stating that RECFM is incompatible.
I have used the RECFM as VB and LRECL=1012.
Can anyone please check and let me know the reason for the error. Thanks in advance!

Related

Understand the following control cards

I have the following control cards that I can't understand how to read. Could someone help me traduce what this part of a JOB is performing?
OUTFIL FNAMES=(XSCB),BLKCCT1,INCLUDE=(67,7,CH,EQ,
C'XSCB ',OR,69,7,CH,EQ,
C'XSCB '),
HEADER2=(22:C'XSCB MVS USERID SYSTEM USAGE REPORT',/,
01:C'GENERATED ON ',&DATE=(MD4/),70:C'PAGE',&PAGE,/,
01:C' AT ',&TIME,/,X,/,
01:C'JULIAN',/,
01:C'DATE TIME SYSTEM JOB MESSAGE',/,
01:C'-------- -------- ------ -------- ---------------->'),
TRAILER1=(X,/,01:C'RECORDS FOUND =',COUNT,/,34:C'END OF REPORT'),
OUTREC=(20,07,ZD,EDIT=(TTTT.TTT),X, * JULIAN DATE
28,08,X, * TIME
11,06,X, * SYSTEM
40,08,X, * JOB OR REF
59,07,CHANGE=(50,C'IEF125I',C'LOGGED ON ', * MESSAGE
C'IEF126I',C'LOGGED OFF'),
NOMATCH=(79,50),
132:X)
I understand that it searches the ID 'XSCB' in the position 67 or 69. But once it finds it, I cannot interpret what it does next.
Those are SORT control cards. If you look at the SYSOUT for the step, and pay attention to the messages, you will be able to tell if it is DFSORT (messages prefixed by ICE) or SyncSORT (messages prefixed by WER).
Your step may be EXEC PGM=SORT or ICEMAN or something else, depends on your site.
The control cards are producing a report. You have at least one line missing from your control cards (OPTION COPY, or SORT FIELDS=COPY or a different SORT or MERGE statement). There could be any number of missing cards, and you possibly have another output from the step. Otherwise the OUTFIL INCLUDE= could perhaps be a plain INCLUDE COND=.
What does what you have shown actually do?
OUTFIL defines final processing for a particular output data set. With no name, it would be for the SORTOUT DD in your JCL.
With FNAMES=(XSCB) it is for a DD named XSCB in your JCL. For a single name specified in FNAMES, the brackets are redundant.
BLKCTT1 says "put a blank in column one to not get a page-eject from TRAILER1 output".
The INCLUDE= is as you suspect. Testing two different starting positions for the same value. If either test is true, the current record will be included in the OUTFIL group.
HEADER2 defines what appears at the top of each page.
The 01: is a column-number, and is redundant, as each line by default starts are column one.
HEADER2 can create multiple lines (as can any HEADERn or TRAILERn and BUILD (or OUTREC, but don't use it for new) on OUTFIL), each separated by "/". &DATE, &TIME and &PAGE are special, containing the obvious. &DATE can be formatted in various ways, MD4/ is MM, DD, YYYY separated by slashes.
The X is a blank, on a line of its own. You could equally see .../,/... or n/ to create n multiple blank lines.
The constants should be obvious.
TRAILER1 defines what is printed at the end of the report.
COUNT is the number of records in the OUTFIL group, here used with no formatting, but it can be formatted.
The 34: column-number means the items following will start from column 34.
The OUTREC is better spelled as BUILD. OUTREC exists elsewhere. BUILD has been around for more than 10 years, so no need to use OUTREC on OUTFIL in new code (maybe this is old anyway).
What the BUILD would do is format the current input record into what is desired for an output line on the report.
The numbers in pairs are start-position and length of fields. Where no field-type is defined, they are (treated as) character fields.
You have one field-type, ZD, which is zoned-decimal. Its length is seven, and an EDIT mask is used, four digits, full-stop (decimal-point) and then three digits.
The Xs as previously are blanks, used as separators on the report. The content of each field is described in a comment. A comment is any text after the end of a control card. A control card ends at the blank after the statement is complete, or where a there is a blank after a possible continuation (a comma or a colon are possible continuations).
132:X puts a blank in column 132, and pads any intervening columns from the last field or constant with blanks.
That leaves the CHANGE=.
CHANGE= is a very useful test-and-replace.
79,50,CHANGE=(50,C'IEF125I',C'LOGGED ON ', * MESSAGE
C'IEF126I',C'LOGGED OFF'),
NOMATCH=(79,50)
This says "at the current column of the record being created, consider the content of the input from position 79 for a length of 50. The output length will be 50. If IEF125I, then use the constant LOGGED ON, if IEF126I use LOGGED OFF, and else (NOMATCH) use whatever is at position 79 for a length of 50 from the input.
Basically, the report is using the system log, or an extract from it, to report activity related to the Userid/Logon XSCB.

CSV data export OTRS

When I export search result to CSV file from OTRS I get the ticket number as: 2,01101E+15 .
No problem uptill now but when I change the number to text field the last digit of ticket number is rounded to zero. e.g if i have a ticket number 123456789 then excel changes it to 123456780.
how can i resolve this problem?
there is actually only one way in Excel to do this.
Create an empty sheet -> Choose File->Import->CSV and select your CSV file. The delimiter should be a semicolon and fields are enclosed by ". In the next step you have to choose "Text" for the Ticket# column.
This is a very annoying Excel "bug". Another way to do this would be a macro, but running macros is often not allowed.
regards
Hannes
Set output in search to CSV, etc.
Chenge System ID on SYSCONFIG::Core in a value with one digit Example: 1 or 2 or 3 ...9
This will short the length of the ticket number and will be displayed normally on .csv file.
Do not put like 01 or 02. It will cause the same error.
BR

comparision of files using packed decimal fields

Hi I have 2 files and I want to compare them using the key field and a packed decimal field in the file.
I have searched in many forums but I could not get the solution.
Please provide me a solution either in the syncsort or DFsort.
File has LRECL of 200 and the field value is starting at 84 and the length is 9.
Both files have same format I need the ouput as below.
Key is starting from 1 and the lenght is 22 and type is alphanumeric for both the files.
File1:should have the matched records from file1 and file2
File2:should have the unmatched records from file1 and file2
Thanks in Advance,
Lakshmi
Yes, a very simple JOINKEYS. You'll need a JOIN UNPAIRED. You'll need two OUTFIL statements for your two output files.
It is unusual to have a choice of either DFSORT or SyncSort. DFSORT has a "matching marker" for JOINKEYS, so very easy to do the final extract. SyncSort relies on you testing for a value which cannot exist in the data to show that a record from one file or the other is not present. Find out which one you have (ICE messages in the sysout from the step are from DFSORT, WER messages are from SyncSort).
I can't believe that you won't be able to find many examples of JOINKEYS if you do a bit of googling.
If you get stuck, add what you have tried to your question, being clear about which SORT product you actually have access to.
If you look at the DFSORT documentation, I believe you will find that using the JOINKEYS statement will your desired result.

Truncating characters when importing with SAS

I have an Excel spreadsheet with company data and descriptions. Some of the cells basically contain mini-essays in them, pages and pages of straight text contained in a single cell. SAS has been giving me problems when I'm importing the file because it truncates some of the longer cells and the text gets cut off mid-sentence. Any ideas on how to avoid this? I've tried saving the file to a tab-delimited text file, but no luck.
Thanks!
Exporting to tab-delimited or csv may be the way to go, as you said. Be sure to have strings enclosed in quotes also. But do you have the length specified for the variable containing the long cells? According to SAS the maximum length is 32,767 characters, so perhaps try as large a number as it takes -- hopefully less than that.
Also the lrecl (max length of each line of the file) should be specified with a max of 32767.
data test;
length company_name $20 description1 description2 $10000;
infile my_tab_dlm_file lrecl = 50000 dsd delimiter = '09'x;
input company_name
description1
description2
;
run;
If you have a license for SAS/ACCESS (which this link explains how to check). You can use a libname to access the Excel spreadsheet (this link talks about Excel access) and this is a great paper which details how to get at the Excel data just like a SAS data set.
(but #Neil Neyman's answer sounds good too)

read complicated excel or csv file into matlab

I have an excel file, which is a mix of text file and numerical values.
For instance, the file look like this,
25 file1
26 file2
Here the 25 is an numerical value in the first cell (row 1, column1). "file1" represents the content in the second cell(row1, column2). It can be short text file composed of multiple paragraphs.
I want to load this excel file into matlab, and store it into a 2*2 matrix. Each matrix entry corresponds to a matrix cell.
I tried xlsread, but it did not work. I also tried textscan, but it seems to be able to handle the scenario where a cell has a string only. Here, the contents of some cells are text files itself.
If you are reading an Excel file using XLSREAD, you can use the third output argument to retrieve the both the textual and numeric data (unprocessed).
Example:
>> [~,~,raw] = xlsread('Book1.xls')
raw =
[25] 'hello world.'
[26] [1x38 char]
>> raw{2,2}
ans =
this is an example
of multi-line
text
Note that XLSREAD is limited to the capabilities of MS Excel to open/read files, so some especially large files (in my experience 1 million+ rows) will get only partially read.

Resources