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
 
Cobol sort output procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Cobol sort output procedure
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Fri Feb 25, 2011 5:47 pm    Post subject:
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    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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm

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