MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sort/split of an XML file
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12401
Topics: 75
Location: San Jose

PostPosted: Mon Feb 29, 2016 11:12 am    Post subject: Reply with quote

misi01 wrote:
It didn't occur to me that any references to positions in the IFTHEN had to take into account that 87 bytes had been "inserted" into the file before what I thought were the positions (so pos 5 - with the RDW - is now 5+87 = 92)


misi01,

For a better understanding

Code:

(WHEN=INIT,BUILD=(1,4,87X,5)),   


translates to
Code:

01 TEMP-RECORD.                               
   05 TEMP-RDW      PIC S9(09) COMP.           
   05 TEMP-KEY      PIC X(87) VALUE SPACES.                 
   05 ORIGINAL-REC  PIC X(1) OCCURS 124 TIMES.


So if you are referring the original fields you need to calculate the length of TEMP-KEY. so your original records starts from 92.

IFTHEN=(WHEN=COND processing in DFSORT is same as EVALUATE in COBOL. So if you can relate the code like this it is much easier to follow and devise solutions.

IFTHEN=(WHEN=INIT and WHEN=GROUP will be executed ALL the time and they should come/processed before your WHEN=COND
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group