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
 

 

Multiply with -1 help needed

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

New User


Joined: 17 Feb 2007
Posts: 47
Location: USA

PostPosted: Thu Feb 07, 2013 6:49 pm    Post subject: Multiply with -1 help needed
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: 47
Location: USA

PostPosted: Thu Feb 07, 2013 7:14 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Feb 07, 2013 7:22 pm    Post subject: Reply to: Multiply with -1 help needed
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

Senior Member


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

PostPosted: Fri Feb 08, 2013 10:29 am    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am
No new posts Information needed on using the COBAN... venugopal.dondla COBOL Programming 5 Thu Oct 08, 2015 3:34 pm
No new posts Help needed in Conditional statement ... vinu78 DB2 5 Tue Sep 15, 2015 10:14 am
No new posts Help needed to locate the changes wh... thesumitk TSO/ISPF 6 Fri Jun 12, 2015 6:21 pm


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