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

SYNCSORT - Replace a 1byte with 2 bytes (overlay)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 52

PostPosted: Tue May 18, 2010 12:31 pm
Reply with quote

My requirement is to replace a byte value with two bytes in fixd lengh file of 80 bytes.
X'05' (tab) -> 'F0F1' (01).
The data is like
Code:

000 00 0782 R1078 00000000 00000000
FFF0FF0FFFF0DFFFF0FFFFFFFF0FFFFFFFF
00050050782591078500000000500000000

I have to replace all X'05' with X'F0F1', (I have tried only at one place as testing) with this the length of the record will be increased and it will be handled in the downstream process.
I have used the below jcl. I am getting SOC4 abend. Could you please suggest.
Code:

//SYSIN    DD  *                                             
 INREC  IFTHEN=(WHEN=(4,1,CH,EQ,X'05'),OVERLAY=(4:'F0F1')) 
   SORT FIELDS=(1,80,CH,A)                                   
/*                                                           

Code:

Error message in spool:
+WER999A TRK426ST,SORT1   ,        -  UNSUCCESSFUL SORT 0C4 S
IEA995I SYMPTOM DUMP OUTPUT  519                             
SYSTEM COMPLETION CODE=0C4  REASON CODE=00000010             
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 18, 2010 12:35 pm
Reply with quote

Moved to the JCL forum as the product being used is SYNCSORT
Back to top
View user's profile Send private message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 52

PostPosted: Tue May 18, 2010 1:41 pm
Reply with quote

Sorry for the typo's before:
My requirement is to replace a byte value with two bytes in fixed length file of 80 bytes.
Replace X'05' (tab) with X'F0F1' (01).
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue May 18, 2010 2:05 pm
Reply with quote

RECFM could be issue. What is RECFM of the file?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue May 18, 2010 2:09 pm
Reply with quote

Escapa, how about the following :

fixd lengh file of 80 bytes.
Back to top
View user's profile Send private message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 52

PostPosted: Tue May 18, 2010 2:27 pm
Reply with quote

The input and output files RECFM=FB, LRECL=80.

The data doesn't occupy complete 80 bytes in input file and the outfile would be enough with 80 bytes.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue May 18, 2010 3:19 pm
Reply with quote

Hi,

shouldn't this
Code:
OVERLAY=(4:'F0F1')) 
be
Code:
OVERLAY=(4:X'F0F1')) 



Gerry
Back to top
View user's profile Send private message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 52

PostPosted: Tue May 18, 2010 7:03 pm
Reply with quote

Sorry, I actually gave the same.
INREC IFTHEN=(WHEN=(4,1,CH,EQ,X'05'),OVERLAY=(4:X'F0F1'))
SORT FIELDS=(1,80,CH,A)
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue May 18, 2010 9:11 pm
Reply with quote

I'm not sure why do you get S0C4, I tried something similar and it worked fine:
Code:
//STEP001  EXEC PGM=SORT                                       
//SORTIN DD *                                                 
1,SGL01      ,GBP     ,ACK                                     
1 ,SGL 01    ,GBPEUR  ,ACK1                                   
//SORTOUT DD DSN=....OUT.file,                                     
//        DISP=(,CATLG,CATLG),SPACE=(TRK,(1,1))               
//SYSIN    DD  *                                               
 INREC  IFTHEN=(WHEN=(4,1,CH,EQ,X'C7'),OVERLAY=(4:X'F0F1'))   
   SORT FIELDS=(1,80,CH,A)                                     
//SYSOUT DD SYSOUT=*                                           
//*                                                           
please re-check that you're telling us everything.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
No new posts To replace jobname in a file with ano... SYNCSORT 12
Search our Forums:

Back to Top