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

Multiply with -1 help needed


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

New User


Joined: 17 Feb 2007
Posts: 52
Location: USA

PostPosted: Thu Feb 07, 2013 6:49 pm
Reply with quote

I am trying to convert the amounts below from +ve to -ve and vise versa. The file is total FB 28 bytes. I am using below mulitply sort parameters. But I am getting Field outside range error. The dollar amount is ZD position 15 length 10.

Please let me know what is wrong with this statement.

Code:
SYSIN :                                                           
 OPTION COPY                                                     
 INREC BUILD=(-1,MUL,15,24,SFF,ZD,LENGTH=10)
           

Code:
WER276B  SYSDIAG= 8796, 1633333, 1633333, 3358275                 
WER164B  5,668K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B     0 BYTES RESERVE REQUESTED, 1,004K BYTES USED         
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                   
WER108I  SORTIN   : RECFM=FB   ; LRECL=    28; BLKSIZE= 27972     
WER073I  SORTIN   : DSNAME=GGG.AAA.RRR.MMM.   
WER230A  INREC    FIELD OUTSIDE RANGE                             


The sample file data.

Code:
ABCD2AA  5    00000672841212
LMNO2AA  6    00000672841212
RRRR2ABS 4    00000132961212
ABCD2ABS 5    000035714J1212
LMNO2ABS 6    000034384N1212
RRRR2AGR 4    00002022591212
ABCD2AGR 5    00229656141212
LMNO2AGR 6    00231678731212
ABCD2AKMD5    00001474221212
LMNO2AKMD6    00001474221212
Back to top
View user's profile Send private message
AJAYREDDY

New User


Joined: 17 Feb 2007
Posts: 52
Location: USA

PostPosted: Thu Feb 07, 2013 7:14 pm
Reply with quote

I think now I got it. I should use below INREC parameters.

Code:
//SYSIN    DD  *                                   
 OPTION COPY                                       
 INREC OVERLAY=(15:15,10,ZD,MUL,-1,TO=ZD,LENGTH=10)

The one that I used before maybe works from position 1 only.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Feb 07, 2013 7:22 pm
Reply with quote

You have SyncSort (WER... messages). SyncSort questions are in the JCL part of the forum.

Instead of multiplying by -1, you could always subtract from zero.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Fri Feb 08, 2013 10:29 am
Reply with quote

Quote:
The one that I used before maybe works from position 1 only.

Your input file is of LRECL=28, however using this
Code:
INREC BUILD=(-1,MUL,15,24,SFF,ZD,LENGTH=10)
you're going beyond that and so the obvious error:
Code:
WER230A  INREC    FIELD OUTSIDE RANGE
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 Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts Help needed to assemble IMS sample co... ABENDS & Debugging 4
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Mainframe profiles needed @ Cognizant Mainframe Jobs 0
No new posts COBOL Student learning COBOL File Han... COBOL Programming 3
Search our Forums:

Back to Top