IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ABENDED S000 When I try to add a Header


IBM Mainframe Forums -> FAQ & Basics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mindless Tree

New User


Joined: 25 Jun 2022
Posts: 5
Location: India

PostPosted: Sun Jul 03, 2022 7:09 pm
Reply with quote

The code works when i remove the Header statement, however when i add it - i'm receiving an "abended s000". how do i fix this?

Code:

//STEP EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//DATA1 DD DSN=<ps-name>,DISP=SHR
//DATA2 DD DSN=<ps-name>,DISP=SHR
//SORTOUT DD DSN=<output-ps>, DISP=(NEW,CATLG,DELETE),
//                     SPACE=(TRK,(1,1),RLSE), UNIT=SYSDA,
//                     DCB=(RECFM=FB,LRECL=100,BLKSIZE=0)
//SYSIN DD *
            SORT FIELDS=COPY
            JOINKEYS F1=DATA1
            JOINKEYS F2=DATA2
            JOIN UNPAIRED,F1,F2
            REFORMAT FIELDS=(F1:1,35,F2:1,35)
            OUTFIL REMOVECC,
                HEADER2=(1:'HEADER1',10:'HEADER2',26:'HEADER3',
                                 36:'HEADER4',45:'HEADER5',64:'HEADER6',/,
                                 1:7'-',10:15'-',36:8'-',45:18'-'),
                BUILD=(1:1,6,10:7,24,26:25,34,36:35,43,45:44,62,64:63,70)
/*
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sun Jul 03, 2022 9:44 pm
Reply with quote

and user and reason info is?
Back to top
View user's profile Send private message
Mindless Tree

New User


Joined: 25 Jun 2022
Posts: 5
Location: India

PostPosted: Sun Jul 03, 2022 10:14 pm
Reply with quote

dneufarth wrote:
and user and reason info is?


it's U0126
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sun Jul 03, 2022 10:21 pm
Reply with quote

not used sort in years, but build might have overlapping fields.
Back to top
View user's profile Send private message
Mindless Tree

New User


Joined: 25 Jun 2022
Posts: 5
Location: India

PostPosted: Sun Jul 03, 2022 10:30 pm
Reply with quote

dneufarth wrote:
not used sort in years, but build might have overlapping fields.


I tried changing the build, and now i'm getting S000 U0222
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sun Jul 03, 2022 10:36 pm
Reply with quote

try doing BUILD one field at a time. Run. add next field.

beware of overlapping and exceeding LRECL issues
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1335
Location: Bamberg, Germany

PostPosted: Sun Jul 03, 2022 10:52 pm
Reply with quote

See also:

1:7C'-',10:15C'-',36:8C'-',45:18C'-') and

26:25,34,36:35,43 ..
Back to top
View user's profile Send private message
Mindless Tree

New User


Joined: 25 Jun 2022
Posts: 5
Location: India

PostPosted: Sun Jul 03, 2022 10:57 pm
Reply with quote

Joerg.Findeisen wrote:
See also:

1:7C'-',10:15C'-',36:8C'-',45:18C'-') and

26:25,34,36:35,43 ..



Tried for a single header filed using -

Code:

OUTFIL REMOVECC,
  HEADER2=(1:'HEADER1',/,
  1:7C'-'),
  BUILD=(1:1,10)


and now i'm getting S000 U0222 :/
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sun Jul 03, 2022 11:01 pm
Reply with quote

Notice the C missing in your Header fields as Joerg pointed out plus ,

Syntax, syntax, syntax
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2141
Location: USA

PostPosted: Mon Jul 04, 2022 1:27 am
Reply with quote

Besides the System/User Abend Codes, there MUST BE real SORT error message in the SORT //SYSOUT, explaining the reason of failure.
The ability to carefully read error messages might help much better than posting on forums.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Mon Jul 04, 2022 4:36 am
Reply with quote

This has always been a challenge so I suggest you to count offsets correctly between the header and detail so that nothing is short in length else it will fail.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> FAQ & Basics

 


Similar Topics
Topic Forum Replies
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
No new posts Reorg abended with REASON=X'00E40347' DB2 2
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Forcing a step to run (even if abended) JCL & VSAM 8
No new posts Comparing Header and Trailer. DFSORT/ICETOOL 7
Search our Forums:

Back to Top