Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
karthikr44,
The date format in your File-1 is CCYYMMDD which in packed decimal would require 5 bytes. But your copybook shows only 5 numeric digits which requires only 3 bytes which agrees with your "File Master". Can you post a few sample records from your actual files.
Thnx for ur solution. But i am getting SOC7 abend.
I/p data:
Code:
DB DT
QTR BEGIN
P 3
27-------
X'274F08'
240
7F8
DUMP:
ADDRESS 00000000 LENGTH 00000000 (DECIMAL ) INVALID LENGTH
JOB: JCLSORT STEP: STEP01 PROGRAM: QKQMAIN
CAPD112W SYMBOLIC INFORMATION NOT FOUND FOR PROGRAM "QKQMAIN ".
ABENDING INSTRUCTION
F871 F0E2 F0EC ZAP ZERO AND ADD
OPERAND: R15!+E2
VALUE: 0000000000000000 <-- NOT NUMERIC
OPERAND: R15!+EC
VALUE: 4F08 <-- NOT NUMERIC
INTERRUPT OCCURRED AT ADDRESS 80023326
ENTRY POINT ADDRESS IS 00007130 AT OFFSET +000000 IN PROGRAM QKQMAIN
And one small update, the first file LRECL is 3208 and not 3200. I think this does not produce the S0C7 abend.
Please suggest me how to solve this abend,
Thanks
R KARTHIK
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
That file I is production file. It wont be wrong
I m not saying that your production file is wrong. The way you interpret might be wrong. A packed decimal field will always store the sign in the last half-byte. And your 3 byte packed date looks like this which is not a valid COMP-3 field. You need to be clear on what data are you processing with.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Open your file in view/browse (not file master) and scroll right to this data position (also use COLS to show the positions in the record). Post this bit of data in hex (HEX ON, copy/paste to the reply you will be creating, and use the "Code" tag to make the data more readable as well as preserve alignment) - including the COL info. Use the Preview to see your reply as it will appear to the forum and when you are satisfied with how your post appears, Submit.
As has been mentioned, the data posted is not valid packed-decimal (comp-3) data.
The following is similar to how your data should be posted. The 2 numbers are valid comp-3 values for 08215 and 21508. I used a C sign, but an F sign could be valid as well.
Code:
--3----+----4-
--------------
* &ð
44025444258444
0081C00010C000
It sounds like the displacement used in the sort control is not where the packed-decimal data is located.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
It sounds like the displacement used in the sort control is not where the packed-decimal data is located.
Karthik,
I had given the control statements based on positions and offset mentioned by you which might be wrong as they dont have valid COMP-3 data. Check your files and find out the correct field positions.
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
Hi,
Hopefully you are available with the manuals, if not request Alissa to send the latest documentation to you, she is SyncSort representative & Moderator of JCL part on this site.
1. OPTION COPY: Causes XXxxSORT to copy a SORTIN data set or inserted records to the output data sets. ( unless all records are disposed of by an E35 exit).
2. IFTHEN clauses: Reformat different records in different ways by specifying how build or overlay items are applied to records that meet given criteria. IFTHEN clauses let you use sophisticated conditional logic to choose how different record types are reformatted.
2. BUILD: Reformat each record by specifying all of its items one by one. Build gives you complete control over the items you want in your reformatted records and the order in which they appear. You can delete, rearrange and insert fields and constants.
3. OVERLAY: Reformat each record by specifying just the items that overlay specific columns. Overlay lets you change specific existing columns without affecting the entire record.
OVERLAY is used to overlay specific bytes - you can't use it to insert characters before other fields. For that you must use BUILD which builds the record item by item.
4. If you have multiple fields to inspect in the same record, you must use the HIT=NEXT option.