Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Reading/updating files containing Spanned Records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
pleasepost

New User


Joined: 27 Sep 2005
Posts: 1

PostPosted: Tue Sep 27, 2005 2:31 am    Post subject: Reading/updating files containing Spanned Records
Reply with quote

I am working with files whose individual (variable) records can span the 32K block. I cannot use the IBM utilities (except IEBGENER to copy) or COBOL to read the files, as they are limited to using QSAM access methods. I have been told that I need to code an assembler program to process these spanned-block files. Could I get some assistance as to what kind of open/get/put coding is needed to do this?

Thanks,
Patel
Back to top
View user's profile Send private message

ARJUN

New User


Joined: 16 Nov 2004
Posts: 18
Location: Chennai

PostPosted: Thu Feb 16, 2006 4:50 pm    Post subject:
Reply with quote

Here is a sample code for reading data from a PS file and writing data to a PS file of REC Length 80


FILEASM1 CSECT
SAVE (14,12)
BALR R12,0
USING *,12
ST R13,SAVEAREA+4

OPEN (INFILE,(INPUT),OUTFILE,(OUTPUT))
LTR R15,R15
BNZ BADOPEN
LOOP DS 0H
GET INFILE,INREC
MVC BATA,DATA
PUT OUTFILE,OUTREC
B LOOP
FINAL DS 0H
CLOSE (INFILE,,OUTFILE)
B RETURN
RETURN L R13,SAVEAREA+4
RETURN (14,12),T,RC=0
YREGS
BADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=11,DESC=7
B RETURN
BADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=11,DESC=7
B RETURN
BADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=11,DESC=7
B RETURN
INFILE DCB DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800,MACRF=GM, +
DDNAME=INDD,EODAD=FINAL
OUTFILE DCB DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800,MACRF=PM, +
DDNAME=OUTDD
INREC DS 0CL80
DATA DS CL80
OUTREC DS 0CL80
BATA DS CL80
SAVEAREA DS 18F
END FILEASM1
Back to top
View user's profile Send private message
winchaat

New User


Joined: 23 Mar 2005
Posts: 14

PostPosted: Thu Feb 16, 2006 6:10 pm    Post subject: hi!!
Reply with quote

hi

The code you given is only suitable for normal PS files.
For VSAM datasets you need to use ACB macros instead of DCB and parameters also should change accordingly



----->RAG
Back to top
View user's profile Send private message
ARJUN

New User


Joined: 16 Nov 2004
Posts: 18
Location: Chennai

PostPosted: Thu Feb 16, 2006 6:25 pm    Post subject:
Reply with quote

yeah,

If it is VSAM you have to use ACB and RPL macros, here is the example..

INFILE ACB AM=VSAM,DDNAME=INDD,MACRF=IN,EXLST=EXITS
RPLNAME RPL ACB=INFILE,AM=VSAM,RECLEN=80,AREA=INREC,AREALEN=80

and you have to use RPL name in GET,PUT macros instead of DCB macro name
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us