I am new to RPGLE .What is the meaning of numbers in D spec(eg:378 379B or 244 253).are there any others ways to declare INFDS or SDS ?
fDROP2AD cf e workstn INFDS(INFDS)
f SFILE(SUB01:RRN1)
// Data Structures
d Infds ds INFDS data structure
d Currec 378 379B 0
//
// Program Info
//
d SDS
d @PGM 001 010
d @PARMS 037 039 0
d @MSGDTA 91 170
d @MSGID 171 174
d @JOB 244 253
d @USER 254 263
d @JOB# 264 269 0
thanks
Supriyo
Software/Hardware used:
as400
ASKED:
December 1, 2011 6:20 AM
UPDATED:
March 6, 2012 5:47 PM
the simple answer, is those are the positions in the data structure where that particular data is found and also optional data type definition (B = binary). The IBM manuels for the INFDS will explain the rest.
Note that those numbers for an INFDS (or any SDS or other DS) have the same meanings as numbers in any D-spec in the same columns.
Tom
are there any others ways to declare INFDS or SDS ?
You can define the data elements in either data structure any way you choose. In order to make use of them, you simply need to know how to get the data into your program and where the data elements are in the structure and what their data types are.
A file information data structure (INFDS) is requested in RPG IV by using the INFDS keyword on the F-spec for a file. The structure is defined by IBM in File Information Data Structure.
A program status data structure is requested in RPG IV by coding SDS for the ‘Data Structure Type’ and ‘Declaration Type’ columns on a D-spec. IBM defines the subfields in Program Status Data Structure.
Tom