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
 
Downloading all records from KSDS to PS File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
kesireddysandeep

New User


Joined: 12 Dec 2006
Posts: 1
Location: hyderabad

PostPosted: Sun Oct 14, 2007 2:18 pm    Post subject: Downloading all records from KSDS to PS File
Reply with quote

how to download all records from ksds file at a time to a PS file and performing some arithmetical operations (like calculating AVG,SUM,FINDING MAX, MIN). And transferring result to another ksds file.
Back to top
View user's profile Send private message

PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sun Oct 14, 2007 2:22 pm    Post subject:
Reply with quote

IDCAMS ( even if the design seems stange to me ).
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Sun Oct 14, 2007 3:49 pm    Post subject:
Reply with quote

kesireddy,

Is this a homework?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Oct 14, 2007 11:09 pm    Post subject:
Reply with quote

Hello kesireddy and welcome to the forums,

If you show some sample input data and what you want the "new" data to look like, someone may be able to offer a suggestion.

From your post, there is little we can offer.
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Mon Oct 15, 2007 3:37 am    Post subject:
Reply with quote

why don't you try writing a program
Back to top
View user's profile Send private message
sachin_star3
Warnings : 1

New User


Joined: 30 Sep 2006
Posts: 78
Location: pune

PostPosted: Sat Oct 27, 2007 1:37 pm    Post subject: Reply to: Downloading all records from KSDS to PS File
Reply with quote

Code:
ID DIVISION.
PROGRM-ID. PGM1.
ENVIRONMENT DIVISION.
 SELECT FILE1 ASSIGN TO DD1
  ORGANIZATION IS INDEXED
  ASSIGN MODE IS SEQUENTIAL.
 SELECT FILE1 ASSIGN TO DD1.
 SELECT FILE1 ASSIGN TO DD1.
  ORGANIZATION IS INDEXED
  ASSIGN MODE IS SEQUENTIAL.
DATA DIVISION.

FILE-SECTION.
FD FILE1.

FD FILE2

FD FILE3.

WORKING-STORAGE SECTION.

01 WS-INPUT-REC.

01 WS-OUTPUT-REC.

01 WS-CALC-PARA









PROCEDURE DIVISION.
000-MAIN-PARA.
 PERFORM  1000-INITIAL-PARA.
 PERFORM  2000-MAIN-PROCESS-PARA.
 PERFORM  3000-TERMINATION-PARA.

1000-INITIAL-PARA.
  OPEN INPUT FILE1.

  OPEN OUTPUT FILE2.
 
  OPEN OUTPUT FILE3.

 READ FILE1 INTO WS-INPUT-REC AT END MOVE Y TO FILE1-EOF
 NOT AT END
  CONTINUE
  END-READ

2000-MAIN-PROCESS-PARA.
  MOVE WS-INPUT-REC TO WS-OUTPUT-REC.
 
   WRITE FILE2 FROM WS-OUTPUT-REC.

   PEFROM 2100-CALCULATION-PARA.


2100-CALCULATION-PARA .

(WRITE DOWN HERE YOUR MAX MIN FORMULE)

 WRITE FILE3 FROM WS-CAL-OUPUT


3000-TERMINATION-PARA.
  CLOSE FILE1
        FILE2
        FILE3.


Code:
[quote][/quote]
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 0 Tue Oct 24, 2017 12:01 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

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