Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Add numeric 1 at the end of the dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Mon Dec 04, 2006 10:35 am    Post subject: Add numeric 1 at the end of the dataset
Reply with quote

Hi All,

Please tell me how to insert numeric 1 at the end of record.

I/P file length 80

I tried this

INREC FIELDS= (1,80,C'1')

but in this case it is treating 1 as a character & I m not able to do SUM operation on 81st byte.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Dec 04, 2006 9:58 pm    Post subject:
Reply with quote

What do you mean by "numeric 1"? C'1' is X'F1' which is a valid ZD value of +1. You can SUM that as a ZD value. If you mean something else by "numeric 1" other than a ZD +1, tell us what you mean. Or explain what you mean by "I'm not able to do SUM operation on 81st byte".
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Dec 05, 2006 9:40 am    Post subject:
Reply with quote

Hi Frank,

Sorry for not making my prev post clear l

INREC FIELDS=(1,80,C'1')
SORT FIELDS=(10,3,CH,A)
SUM FIELDS=(80,1,ZD)

It is giving me SOC7 in that case.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Dec 05, 2006 9:30 pm    Post subject:
Reply with quote

You have 1,80,C'1' for INREC which puts the '1' (X'F1') in position 81, but you have 80,1,ZD for SUM which is summing on position 80 rather than position 81. You need 81,1,ZD for SUM:

Code:

  INREC FIELDS=(1,80,C'1') 
  SORT FIELDS=(10,3,CH,A)   
  SUM FIELDS=(81,1,ZD)     


Note that if you want to ensure that the SUM in 81 is printable, you should also use:

Code:

   OPTION ZDPRINT
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Dec 05, 2006 9:32 pm    Post subject:
Reply with quote

HI Frank,

Thanks alot my mistake..
Sorry to bug u so much
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm
No new posts VSAM dataset not found abdulrafi JCL & VSAM 5 Fri Jan 12, 2018 11:19 am
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us