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
 
3 diff transactions 3 accounts

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
cmohanraj

New User


Joined: 04 Apr 2005
Posts: 15

PostPosted: Mon Apr 11, 2005 2:46 pm    Post subject: 3 diff transactions 3 accounts
Reply with quote

there are 3 customers of a bank.
A,B,C

I want to write the transactions done by each of them in separate files

Let the account numbers be 1,2,3

Now tell me the steps how u will logically work out this.

(like how u will proceed doing this let it be jcl,cobol )
Back to top
View user's profile Send private message

Vayunandanrao

New User


Joined: 22 Mar 2005
Posts: 9

PostPosted: Mon Apr 11, 2005 5:23 pm    Post subject: Re: 3 diff transactions 3 accounts
Reply with quote

Hi ,

First accept the a/c number based on a/c number , move or go to perticular statement/paragraph . There u can do as ur wish.

I think this is correct , if any mistake plz let me back

Regards
-VayunandanRao-
Back to top
View user's profile Send private message
sribks2005

New User


Joined: 04 Apr 2005
Posts: 20
Location: Mysore

PostPosted: Mon Apr 11, 2005 7:49 pm    Post subject: 3 different transactions 3 files
Reply with quote

hi,

we can use "SORT" utility in JCL for this purpose.
Below i have given JCL code snippet to illustrate on this.

This will create 3 files based on the first 2 numbers in the input file.

Records having first 2 digits "01" will be put in file 1[ SORTOF1]
Records having first 2 digits "02" will be put in file 2 [SORTOF2]
Records having first 2 digits "03" will be put in file 2 [SORTOF3]


===========================================
Add job card info here

//PS01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN="input file name here",DISP=SHR
//*
//SORTOF1 DD DSN=B052DNS.BKS4.RECORD1,
// DISP=(,CATLG,DELETE),
// UNIT=TEST,SPACE=(TRK,(10,50),RLSE),
// DCB=(B0.DSCB,RECFM=FB,LRECL=80,BLKSIZE=0)
//SORTOF2 DD DSN=B052DNS.BKS4.RECORD2,
// DISP=(,CATLG,DELETE),
// UNIT=TEST,SPACE=(TRK,(10,50),RLSE),
// DCB=(B0.DSCB,RECFM=FB,LRECL=80,BLKSIZE=0)
//SORTOF3 DD DSN=B052DNS.BKS4.RECORD3,
// DISP=(,CATLG,DELETE),
// UNIT=TEST,SPACE=(TRK,(10,50),RLSE),
// DCB=(B0.DSCB,RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=1,INCLUDE=(1,2,ZD,EQ,01)
OUTFIL FILES=2,INCLUDE=(1,2,ZD,EQ,02)
OUTFIL FILES=3,INCLUDE=(1,2,ZD,EQ,03)
//*
==============================================
i hope this will help you.
please inform us , whether this is what you wanted.

Thank you
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 Apr 11, 2005 10:22 pm    Post subject:
Reply with quote

Mohanraj,

Here's a DFSORT job to do what you want, assuming the account numbers are 5-byte ZD values in positions 11-15:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT1 DD DSN=...  output file for '1' transactions
//OUT2 DD DSN=...  output file for '2' transactions
//OUT3 DD DSN=...  output file for '3' transactions
//SYSIN DD *
  OPTION COPY
  OUTFIL FNAMES=OUT1,INCLUDE=(11,5,ZD,EQ,+1)
  OUTFIL FNAMES=OUT2,INCLUDE=(11,5,ZD,EQ,+2)
  OUTFIL FNAMES=OUT3,INCLUDE=(11,5,ZD,EQ,+3)
/*
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS SOCKET shared between two transa... akont CICS 3 Mon Jun 27, 2016 1:27 pm
No new posts Compare PD Values with same storage &... Shrinika Rajendran JCL & VSAM 5 Wed Nov 05, 2014 3:17 pm
No new posts merge records from 2 ps files with di... kishpra DFSORT/ICETOOL 6 Wed Mar 19, 2014 1:00 pm
No new posts Need help on SORT to write each input... rahul sijoriya JCL & VSAM 4 Mon Dec 02, 2013 9:09 pm
No new posts Impact on Online Transactions:- VSAM ... subdalal CICS 2 Thu Oct 17, 2013 10:25 am

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