Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 51

PostPosted: Tue May 18, 2010 12:31 pm    Post subject: SYNCSORT - Replace a 1byte with 2 bytes (overlay)
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: 8593
Location: Back in jolly old England

PostPosted: Tue May 18, 2010 12:35 pm    Post subject:
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: 51

PostPosted: Tue May 18, 2010 1:41 pm    Post subject:
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    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue May 18, 2010 2:09 pm    Post subject:
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: 51

PostPosted: Tue May 18, 2010 2:27 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Tue May 18, 2010 3:19 pm    Post subject:
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: 51

PostPosted: Tue May 18, 2010 7:03 pm    Post subject:
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

Senior Member


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

PostPosted: Tue May 18, 2010 9:11 pm    Post subject: Reply to: SYNCSORT - Replace a 1byte with 2 bytes (overlay)
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us