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

Cobol sort output procedure


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ShwetaG

New User


Joined: 26 May 2010
Posts: 5
Location: Pune

PostPosted: Fri Feb 25, 2011 5:05 pm
Reply with quote

Hello Can anyone please look and advice.

Input file record structure (RECORD LENGTH 596)

2 CYCL-REV-CD X(7) 128 571 577 7
2 CYCL-RATING-COUNTRY-CD XXX 129 578 580 3
2 CYCL-TAX-EXEMPT-IND X 130 581 581 1
2 CYCL-TAX-ALPHA GROUP 131 582 587 6
3 CYCL-TAX-AMT S9(9)V99 132 582 587 6
2 CYCL-CURNCY-CD XXX 133 588 590 3
2 CYCL-EXCHNG-RT S9(4)V9(6) 134 591 596 6


Output file record structure :RECORD OF OUTPUT FILE IS 634:

2 DSCC-TAX-EXEMPT-IND X 130 581 581 1
2 DSCC-TAX-OFFSET GROUP 131 582 619 38
3 DSCC-CUSTOM-SELECT-TYPE X 132 582 582 1
3 DSCC-DSCT-APPLIED-IND X 133 583 583 1
3 DSCC-SEQ1-DSCT-ELMT-CD X(6) 134 584 589 6
3 DSCC-SEQ1-DRATE-SCHED X(6) 135 590 595 6
3 DSCC-SEQ2-DSCT-ELMT-CD X(6) 136 596 601 6
3 DSCC-SEQ2-DRATE-SCHED X(6) 137 602 607 6
3 DSCC-SEQ3-DSCT-ELMT-CD X(6) 138 608 613 6
3 DSCC-SEQ3-DRATE-SCHED X(6) 139 614 619 6
2 DSCC-TAX-ALPHA GROUP 140 620 625 6
3 DSCC-TAX-AMT S9(9)V99 141 620 625 6
2 DSCC-CURNCY-CD XXX 142 626 628 3
2 DSCC-EXCHNG-RT S9(4)V9(6) 143 629 634 6



SORT NBCYCLS1
ON ASCENDING KEY
CYCLS1-RECORD-TYPE-CD
VERSION 9 REL. 1.0
CYCLS1-INTR-CMPNY-CD
CYCLS1-WBS-CD-LEVEL-01
CYCLS1-REMITTING-ACCT-ID
CYCLS1-ACCT-ID
CYCLS1-SRVC-LOC-ID
CYCLS1-RESR-ID
CYCLS1-CALLTYP
CYCLS1-SRVC-CD
CYCLS1-TERM-CD
CYCLS1-RATE-PER
CYCLS1-CALL-REC-DT-NUM
CYCLS1-CALL-REC-TM-NUM
USING
NBCYCLI1
USING
NBCYCLI1
OUTPUT PROCEDURE IS
B100-PROCESS-ALL-DSCT THRU
B100-PROCESS-ALL-DSCT-EXIT

OUTPUT PROCEDURE PARA RETURN COMMAND

*-----------------------------------------------------------
NBCC270-READ-CYCLE-REC SECTION.
* DISPLAY 'NBCC270: READING FROM CYCL'
RETURN NBCYCLS1 INTO NBDSCCQ1
AT END
SET EOF-CYCLE-CALL-REC TO TRUE
MOVE WS-HIGH-VALUES
TO DSCC-WBS-CD-LEVEL-01 OF NBDSCCQ1
DSCC-ACCT-ID OF NBDSCCQ1
DSCC-REMITTING-ACCT-ID OF NBDSCCQ1
END-RETURN.
MOVE DSCC-TAX-OFFSET OF NBDSCCQ1 (1:6)
TO DSCC-TAX-ALPHA OF NBDSCCQ1

INITIALIZE DSCC-TAX-OFFSET OF NBDSCCQ1

MOVE DSCC-TAX-OFFSET OF NBDSCCQ1(7:3)
TO DSCC-CURNCY-CD OF NBDSCCQ1
[color=red]MOVE DSCC-TAX-OFFSET OF NBDSCCQ1(10:6)
TO DSCC-EXCHNG-RT OF NBDSCCQ1
[/color]

Font in red colour is the amended code.My worry is i am not able to
see data of input file variable of CYCL-EXCHNG-RT OF NBCYCLQ1 into output file variable DSCC-EXCHNG-RT of NBDSCCQ1.

After the return command why CYCL-EXCHNG-RT data is not returned in to output DSCC-EXCHNG-RT.

I stuggling really hard but not able to find the reason where the data is getting jumped into ouput file so that i can use the reference modification to move data into respective output field.

Any help would be greatly appriciated.

Thank You.
Shweta G.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Feb 25, 2011 5:47 pm
Reply with quote

You have posted a lot of data and very little of it makes sense.

Posting the actual variable definitions is usualy better than posting the map. If I'm reading the code correctly, you are moving the first three bytes of DSCC-SEQ3-DSCT-ELMT-CD to DSCC-CURNCY-CD for some reason. You then move the last three bytes of DSCC-SEQ3-DSCT-ELMT-CD and the first three bytes of DSCC-SEQ3-DRATE-SCHED into DSCC-EXCHNG-RT. This seems counter intuitive to me.

Was this code working before you changed things? If so, look to your changes to find the problem.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
Search our Forums:

Back to Top