Un-Answered Questions { IBM AS400 AllOther }

can you explain the difference between spacea,spaceb,skipa and skipb. I'm new to learning about as400 and printer files. can any one give me an example using source code showing the difference that occurs between using these 4 keywords. A-Physical file PF004 source UNIQUE R RR STUNAM 10 ROLLNU 5 0 MARKS 3 0 SEX 6 K ROLLNU 4 records present in PF004 are STUNAM ROLLNU MARKS SEX KAVYA 12,344 55 FEMALE MADHAVAN 14,579 60 MALE RAMYA 14,785 70 FEMALE KRISHNAN 14,988 72 MALE B-Printer File PRINT1 source A R HEADER A 10 3'STUNAM' A 10 20'ROLLNU' A 10 30'MARKS' A 10 40'SEX' A R DETAIL A SPACEB(1) A STUNAM 10 3 A ROLLNU 5 0 20 A MARKS 3 0 30 A SEX 6 40 A R FOOTER A SPACEB(1) A 20'END OF REPORT' C-RPG/400 Program PRTTPG source FPF004 I F E DISK FPRINT1 O E PRINTER C WRITE HEADER C READ PF004 60 C *IN60 DOWEQ *OFF C WRITE DETAIL C READ PF004 60 C ENDDO C WRITE FOOTER C SETON LR D-spooled file result set Display Spooled File File . . . . . : PRINT1 Page/Line 1/10 Control . . . . . Columns 1 - 130 Find . . . . . . *...+....1....+....2....+....3....+....4....+....5....+.... 6....+....7....+....8....+....9....+....0....+....1....+.... 2....+....3 STUNAM ROLLNU MARKS SEX KAVYA 12344 055 FEMALE MADHAVAN 14579 060 MALE RAMYA 14785 070 FEMALE KRISHNAN 14988 072 MALE END OF REPORT Bottom F3=Exit F12=Cancel F19=Left F20=Right F24=More keys I have changed from SPACEB to SPACEA now in my printer file source E-Changed PRINT1 Source A R HEADER A 10 3'STUNAM' A 10 20'ROLLNU' A 10 30'MARKS' A 10 40'SEX' A R DETAIL A SPACEA(1) A STUNAM 10 3 A ROLLNU 5 0 20 A MARKS 3 0 30 A SEX 6 40 A R FOOTER A SPACEA(1) A 20'END OF REPORT' F-Spooled file Result Set after keyword change Display Spooled File File . . . . . : PRINT1 Page/Line 1/10 Control . . . . . Columns 1 - 130 Find . . . . . . *...+....1....+....2....+....3....+....4....+....5....+.... 6....+....7....+....8....+....9....+....0....+....1....+.... 2....+....3 KAVYAM 12344U 055KS FEMALE MADHAVAN 14579 060 MALE RAMYA 14785 070 FEMALE KRISHNAN 14988 072 MALE END OF REPORT Bottom F3=Exit F12=Cancel F19=Left F20=Right F24=More keys Overprinting not displayed.

10207


all i need to know about cmpseqdat parameter in cmppfm, how it works and can we retrieve line sequence and date from the output?

2398


How to add 99 menu (page down) option in menu creation..

1913


Service Program : S1 Modules in S1 : M1 M1 having two procedures : ADD, SUB Current Binder Language STRPGMEXP PGMLVL(*CURRENT) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") ENDPGMEXP Doubt: I need to add one new Module to the Service Program M2 having one procedure ‘MULT’ How to add this new module to the service program S1 ? If I need to recreate the service program again, Do I need to mention the Module M1 again while recreating along with new Module M2? There is no Binding Directory. Binder language structure will be like this STRPGMEXP PGMLVL(*CURRENT) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") EXPORT SYMBOL("MULT") ENDPGMEXP STRPGMEXP PGMLVL(*PREVIOUS) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") ENDPGMEXP

1919


. How to know why the OPM job is in MSGWAIT state?..WHAT COULD BE THE REASON FOR it?

7013


hi guys i am new for sqlrpgle, please suggest me good websites and theory and coding. plz plz its very urgent.

2120


how to write code for singlepage in sqlrpgle with update ?

2356


WHAT is STORED PROCEDURE CONCEPT IN AS400 WITH EXAMPLE?

2023


1)In a pf if we delete a record then how to insert a new record at the same place in that pf?? any logic or code? 2)A batch job is taking a lot of time to run,found that it is going into loop and wrapping up so how to skip that loop and process the job without changing the code? 3)In which scenario C D I R comes and C D G F comes in a job? 4)If a job came to error while processing a file how we can know at which record the error hit and how to skip that record and process other records without changing program code?

3054


Hello, I have created a CMD type object. In one of the fields in Display file , I would like to see All the Source files present by pass the name of Library. Tried using CHoice(Keyword) and Choicepgm on PARM , but doesn't seems to be working. Any help please..

1775


I have created a command that display Source file and library. Now i want that when i enter library name and press f4 on Source file, pgm should display all the PF- SRC's in that Library. For F4 option i have used Choice program but since only limited paramters are passed in Choice pgm i am not able to paas library name and further can't call a pgm that will display list of Source files. Below is the Code snippet for CMD type object :- CMD PROMPT('Source Scan for HUB Standard') PARM KWD(SOURCE) TYPE(*CHAR) LEN(1) RSTD(*YES) + VALUES(N A) MIN(1) + CHOICE('N,A') PARM KWD(SRCFILE) TYPE(FILE) RSTD(*NO) + PROMPT('SOURCE FILE') FILE: QUAL TYPE(*NAME) LEN(10) RSTD(*NO) EXPR (*YES) + CHOICE(*PGM) + CHOICEPGM (XXXXXLIB/YYYPGM) QUAL TYPE(*NAME) LEN(10) DFT(*LIBL) + SPCVAL((*LIBL)) EXPR(*YES) PROMPT ('Library') Below is the Choice pgm:- PGM PARM(&PARM1 &PARM2) DCL VAR(&PARM1) TYPE(*CHAR) LEN (21) DCL VAR(&PARM2) TYPE(*CHAR) LEN (2000) IF COND(%SST(&PARM1 1 10) = 'CHOICE ' *AND + %SST(&PARM1 11 10) = 'SRCFILE ' *AND + (%SST(&PARM1 21 1) = 'C' *OR %SST (&PARM1 + 21 1) = 'P')) THEN (DO) /* (%SST(&PARM1 21 1) = 'C' *OR %SST (&PARM1 + */ CHGVAR VAR(&PARM2) VALUE('Name, F4 for List') ENDDO IF COND(%SST(&PARM1 1 10) = 'CHOICE ' *AND + %SST(&PARM1 11 10) = 'SRCFILE ' *AND + %SST(&PARM1 21 1) = 'P') THEN (DO) CHGVAR VAR(&PARM2) VALUE('Name, F4 for List') CALL PGM(GTSQL) PARM ('XXXXLIB') return ENDDO Thanks in Advance for looking into.

3028


I need to insert a record in a file using STRSQL containing the some field values same as an already existing record in that file.I know to smple insert mentioning those values one by one.But is there any another query can be prepared for the same .Please share the query if known to you. Thanks in advance.

2247


If i change any file through application after entering data , how to check which file is updated through applications . For call stack we takes esc 3 then we chose 11..But What is answer of below qtn..?

1472


What is the draw back of Procedures? why we are going to Modules?

1217


any one have give AS400 study material? pls pass it to gopalsai789@gmail.com

1213