|
View previous topic :: View next topic
|
| Author |
Message |
Mindless Tree
New User
Joined: 25 Jun 2022 Posts: 5 Location: India
|
|
|
|
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 |
|
 |
dneufarth
Active User

Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
| and user and reason info is? |
|
| Back to top |
|
 |
Mindless Tree
New User
Joined: 25 Jun 2022 Posts: 5 Location: India
|
|
|
|
| dneufarth wrote: |
| and user and reason info is? |
it's U0126 |
|
| Back to top |
|
 |
dneufarth
Active User

Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
| not used sort in years, but build might have overlapping fields. |
|
| Back to top |
|
 |
Mindless Tree
New User
Joined: 25 Jun 2022 Posts: 5 Location: India
|
|
|
|
| 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 |
|
 |
dneufarth
Active User

Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
try doing BUILD one field at a time. Run. add next field.
beware of overlapping and exceeding LRECL issues |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
See also:
1:7C'-',10:15C'-',36:8C'-',45:18C'-') and
26:25,34,36:35,43 .. |
|
| Back to top |
|
 |
Mindless Tree
New User
Joined: 25 Jun 2022 Posts: 5 Location: India
|
|
|
|
| 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 |
|
 |
dneufarth
Active User

Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Notice the C missing in your Header fields as Joerg pointed out plus ,
Syntax, syntax, syntax |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
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 |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
|
|
| 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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|