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
 
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 Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

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